ywana-core8 0.0.232 → 0.0.236
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 +19 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.modern.js +19 -4
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +19 -4
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/domain/TablePage.js +17 -4
package/dist/index.modern.js
CHANGED
@@ -4824,13 +4824,28 @@ var TableEditor = function TableEditor(props) {
|
|
4824
4824
|
});
|
4825
4825
|
}
|
4826
4826
|
|
4827
|
+
function renderGroupLabel(groupName) {
|
4828
|
+
var grouper = schema[groupBy];
|
4829
|
+
|
4830
|
+
if (grouper.options) {
|
4831
|
+
var options = CHECK['isFunction'](grouper.options) ? grouper.options() : grouper.options;
|
4832
|
+
var option = options.find(function (option) {
|
4833
|
+
return option.value === groupName;
|
4834
|
+
});
|
4835
|
+
console.log(groupName, options, option);
|
4836
|
+
return option.label ? option.label : groupName + "LABEL NOT FOUND ";
|
4837
|
+
} else {
|
4838
|
+
return groupName;
|
4839
|
+
}
|
4840
|
+
}
|
4841
|
+
|
4827
4842
|
function renderGroups() {
|
4828
4843
|
var items = filter ? filter(all) : all;
|
4829
|
-
var groups = items.reduce(function (groups,
|
4830
|
-
var groupName =
|
4844
|
+
var groups = items.reduce(function (groups, item) {
|
4845
|
+
var groupName = item[groupBy];
|
4831
4846
|
var group = groups[groupName];
|
4832
4847
|
if (!group) groups[groupName] = [];
|
4833
|
-
groups[groupName].push(
|
4848
|
+
groups[groupName].push(item);
|
4834
4849
|
return groups;
|
4835
4850
|
}, {});
|
4836
4851
|
return Object.keys(groups).map(function (groupName) {
|
@@ -4894,7 +4909,7 @@ var TableEditor = function TableEditor(props) {
|
|
4894
4909
|
key: groupName
|
4895
4910
|
}, /*#__PURE__*/React.createElement(Header, {
|
4896
4911
|
title: groupName
|
4897
|
-
}, /*#__PURE__*/React.createElement("span", {
|
4912
|
+
}, renderGroupLabel(groupName), /*#__PURE__*/React.createElement("span", {
|
4898
4913
|
className: "size"
|
4899
4914
|
}, groupSize)), /*#__PURE__*/React.createElement(DataTable, _extends({}, table, {
|
4900
4915
|
onRowSelection: select,
|