ywana-core8 0.0.617 → 0.0.620
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 +14 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.modern.js +14 -6
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +14 -6
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/domain/CollectionPage.js +11 -6
package/dist/index.cjs
CHANGED
@@ -5947,20 +5947,28 @@ var CollectionTree = function CollectionTree(props) {
|
|
5947
5947
|
}
|
5948
5948
|
|
5949
5949
|
function group(items, by) {
|
5950
|
-
var options = schema[by].options;
|
5950
|
+
var options = schema[by] ? schema[by].options : null;
|
5951
5951
|
return items.reduce(function (nodes, field) {
|
5952
5952
|
var node = nodes.find(function (n) {
|
5953
5953
|
return n.name === field[by];
|
5954
5954
|
});
|
5955
5955
|
|
5956
5956
|
if (!node) {
|
5957
|
-
var name =
|
5958
|
-
|
5959
|
-
|
5957
|
+
var name = field[by];
|
5958
|
+
var title = field[by];
|
5959
|
+
|
5960
|
+
if (options) {
|
5961
|
+
var opt = options.find(function (option) {
|
5962
|
+
return option.value === field[by];
|
5963
|
+
});
|
5964
|
+
if (opt) title = opt.label;
|
5965
|
+
}
|
5966
|
+
|
5960
5967
|
node = {
|
5961
5968
|
name: name,
|
5962
5969
|
items: [],
|
5963
|
-
field: by
|
5970
|
+
field: by,
|
5971
|
+
title: title
|
5964
5972
|
};
|
5965
5973
|
nodes.push(node);
|
5966
5974
|
}
|
@@ -5981,7 +5989,7 @@ var CollectionTree = function CollectionTree(props) {
|
|
5981
5989
|
|
5982
5990
|
function renderNodes(nodes) {
|
5983
5991
|
return nodes.map(function (node) {
|
5984
|
-
var title = typeof node.name === 'boolean' ? node.field + " = " + node.name : node.
|
5992
|
+
var title = typeof node.name === 'boolean' ? node.field + " = " + node.name : node.title;
|
5985
5993
|
return /*#__PURE__*/React__default["default"].createElement(TreeNode, {
|
5986
5994
|
key: node.name,
|
5987
5995
|
icon: null,
|