ywana-core8 0.0.616 → 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.umd.js CHANGED
@@ -5733,6 +5733,7 @@
5733
5733
  }) : false), canFilter && showFilter ? /*#__PURE__*/React__default["default"].createElement(CollectionFilters, {
5734
5734
  schema: schema
5735
5735
  }) : null, levels ? /*#__PURE__*/React__default["default"].createElement(CollectionTree, {
5736
+ schema: schema,
5736
5737
  icon: icon,
5737
5738
  levels: levels,
5738
5739
  onSelect: onSelect,
@@ -5916,7 +5917,8 @@
5916
5917
  onSelect = props.onSelect,
5917
5918
  sorter = props.sorter,
5918
5919
  _props$searchBy2 = props.searchBy,
5919
- searchBy = _props$searchBy2 === void 0 ? [] : _props$searchBy2;
5920
+ searchBy = _props$searchBy2 === void 0 ? [] : _props$searchBy2,
5921
+ schema = props.schema;
5920
5922
 
5921
5923
  var _useContext3 = React.useContext(PageContext),
5922
5924
  pageContext = _useContext3[0],
@@ -5939,6 +5941,7 @@
5939
5941
  }
5940
5942
 
5941
5943
  function group(items, by) {
5944
+ var options = schema[by] ? schema[by].options : null;
5942
5945
  return items.reduce(function (nodes, field) {
5943
5946
  var node = nodes.find(function (n) {
5944
5947
  return n.name === field[by];
@@ -5946,6 +5949,14 @@
5946
5949
 
5947
5950
  if (!node) {
5948
5951
  var name = field[by];
5952
+
5953
+ if (options) {
5954
+ var opt = options.find(function (option) {
5955
+ return option.value === field[by];
5956
+ });
5957
+ if (opt) name = opt.label;
5958
+ }
5959
+
5949
5960
  node = {
5950
5961
  name: name,
5951
5962
  items: [],