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.
package/dist/index.cjs CHANGED
@@ -5947,7 +5947,6 @@ var CollectionTree = function CollectionTree(props) {
5947
5947
  }
5948
5948
 
5949
5949
  function group(items, by) {
5950
- console.log(schema, items, by);
5951
5950
  var options = schema[by] ? schema[by].options : null;
5952
5951
  return items.reduce(function (nodes, field) {
5953
5952
  var node = nodes.find(function (n) {
@@ -5955,9 +5954,15 @@ var CollectionTree = function CollectionTree(props) {
5955
5954
  });
5956
5955
 
5957
5956
  if (!node) {
5958
- var name = options ? options.find(function (option) {
5959
- return option.value === field[by];
5960
- }) : field[by];
5957
+ var name = field[by];
5958
+
5959
+ if (options) {
5960
+ var opt = options.find(function (option) {
5961
+ return option.value === field[by];
5962
+ });
5963
+ if (opt) name = opt.label;
5964
+ }
5965
+
5961
5966
  node = {
5962
5967
  name: name,
5963
5968
  items: [],