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.modern.js
CHANGED
@@ -5939,20 +5939,28 @@ var CollectionTree = function CollectionTree(props) {
|
|
5939
5939
|
}
|
5940
5940
|
|
5941
5941
|
function group(items, by) {
|
5942
|
-
var options = schema[by].options;
|
5942
|
+
var options = schema[by] ? schema[by].options : null;
|
5943
5943
|
return items.reduce(function (nodes, field) {
|
5944
5944
|
var node = nodes.find(function (n) {
|
5945
5945
|
return n.name === field[by];
|
5946
5946
|
});
|
5947
5947
|
|
5948
5948
|
if (!node) {
|
5949
|
-
var name =
|
5950
|
-
|
5951
|
-
|
5949
|
+
var name = field[by];
|
5950
|
+
var title = field[by];
|
5951
|
+
|
5952
|
+
if (options) {
|
5953
|
+
var opt = options.find(function (option) {
|
5954
|
+
return option.value === field[by];
|
5955
|
+
});
|
5956
|
+
if (opt) title = opt.label;
|
5957
|
+
}
|
5958
|
+
|
5952
5959
|
node = {
|
5953
5960
|
name: name,
|
5954
5961
|
items: [],
|
5955
|
-
field: by
|
5962
|
+
field: by,
|
5963
|
+
title: title
|
5956
5964
|
};
|
5957
5965
|
nodes.push(node);
|
5958
5966
|
}
|
@@ -5973,7 +5981,7 @@ var CollectionTree = function CollectionTree(props) {
|
|
5973
5981
|
|
5974
5982
|
function renderNodes(nodes) {
|
5975
5983
|
return nodes.map(function (node) {
|
5976
|
-
var title = typeof node.name === 'boolean' ? node.field + " = " + node.name : node.
|
5984
|
+
var title = typeof node.name === 'boolean' ? node.field + " = " + node.name : node.title;
|
5977
5985
|
return /*#__PURE__*/React.createElement(TreeNode, {
|
5978
5986
|
key: node.name,
|
5979
5987
|
icon: null,
|