ywana-core8 0.0.618 → 0.0.619

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5939,7 +5939,6 @@ var CollectionTree = function CollectionTree(props) {
5939
5939
  }
5940
5940
 
5941
5941
  function group(items, by) {
5942
- console.log(schema, items, by);
5943
5942
  var options = schema[by] ? schema[by].options : null;
5944
5943
  return items.reduce(function (nodes, field) {
5945
5944
  var node = nodes.find(function (n) {
@@ -5947,9 +5946,15 @@ var CollectionTree = function CollectionTree(props) {
5947
5946
  });
5948
5947
 
5949
5948
  if (!node) {
5950
- var name = options ? options.find(function (option) {
5951
- return option.value === field[by];
5952
- }) : field[by];
5949
+ var name = field[by];
5950
+
5951
+ if (options) {
5952
+ var opt = options.find(function (option) {
5953
+ return option.value === field[by];
5954
+ });
5955
+ if (opt) name = opt.label;
5956
+ }
5957
+
5953
5958
  node = {
5954
5959
  name: name,
5955
5960
  items: [],