ywana-core8 0.0.665 → 0.0.667
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 +8 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.modern.js +8 -6
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +8 -6
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/domain/CollectionPage.js +7 -9
- package/src/domain/TablePage2.js +3 -1
package/dist/index.modern.js
CHANGED
@@ -5659,8 +5659,6 @@ var CollectionPage = function CollectionPage(props) {
|
|
5659
5659
|
canAdd = _props$canAdd === void 0 ? false : _props$canAdd,
|
5660
5660
|
_props$canDelete = props.canDelete,
|
5661
5661
|
canDelete = _props$canDelete === void 0 ? false : _props$canDelete,
|
5662
|
-
_props$canEdit = props.canEdit,
|
5663
|
-
canEdit = _props$canEdit === void 0 ? false : _props$canEdit,
|
5664
5662
|
searchBy = props.searchBy,
|
5665
5663
|
addValidator = props.addValidator,
|
5666
5664
|
_props$autosave = props.autosave,
|
@@ -5672,6 +5670,7 @@ var CollectionPage = function CollectionPage(props) {
|
|
5672
5670
|
groupBy = props.groupBy,
|
5673
5671
|
levels = props.levels,
|
5674
5672
|
sorter = props.sorter,
|
5673
|
+
namer = props.namer,
|
5675
5674
|
editor = props.editor,
|
5676
5675
|
footer = props.footer,
|
5677
5676
|
children = props.children;
|
@@ -5750,7 +5749,8 @@ var CollectionPage = function CollectionPage(props) {
|
|
5750
5749
|
levels: levels,
|
5751
5750
|
onSelect: onSelect,
|
5752
5751
|
sorter: sorter,
|
5753
|
-
searchBy: searchBy
|
5752
|
+
searchBy: searchBy,
|
5753
|
+
namer: namer
|
5754
5754
|
}) : /*#__PURE__*/React.createElement(CollectionList, {
|
5755
5755
|
groupBy: groupBy,
|
5756
5756
|
onSelect: onSelect,
|
@@ -5765,7 +5765,6 @@ var CollectionPage = function CollectionPage(props) {
|
|
5765
5765
|
autosave: autosave,
|
5766
5766
|
delay: delay,
|
5767
5767
|
canDelete: canDelete,
|
5768
|
-
canEdit: canEdit,
|
5769
5768
|
onReload: reloadSelection,
|
5770
5769
|
patch: patch
|
5771
5770
|
}), children ? /*#__PURE__*/React.createElement("article", null, children) : null, /*#__PURE__*/React.createElement("footer", null, footer)));
|
@@ -5951,6 +5950,7 @@ var CollectionTree = function CollectionTree(props) {
|
|
5951
5950
|
levels = props.levels,
|
5952
5951
|
onSelect = props.onSelect,
|
5953
5952
|
sorter = props.sorter,
|
5953
|
+
namer = props.namer,
|
5954
5954
|
_props$searchBy2 = props.searchBy,
|
5955
5955
|
searchBy = _props$searchBy2 === void 0 ? [] : _props$searchBy2,
|
5956
5956
|
schema = props.schema;
|
@@ -6031,7 +6031,7 @@ var CollectionTree = function CollectionTree(props) {
|
|
6031
6031
|
icon: icon,
|
6032
6032
|
key: item.id,
|
6033
6033
|
id: item.id,
|
6034
|
-
label: item.name,
|
6034
|
+
label: namer ? namer(item) : item.name,
|
6035
6035
|
onSelect: select,
|
6036
6036
|
selected: selected,
|
6037
6037
|
actions: actions
|
@@ -7567,7 +7567,8 @@ var TablePage2 = function TablePage2(props) {
|
|
7567
7567
|
editorFilter = _props$editorFilter === void 0 ? false : _props$editorFilter,
|
7568
7568
|
tabbedBy = props.tabbedBy,
|
7569
7569
|
tableClassName = props.tableClassName,
|
7570
|
-
children = props.children
|
7570
|
+
children = props.children,
|
7571
|
+
onSelect = props.onSelect;
|
7571
7572
|
|
7572
7573
|
var _useContext = useContext(PageContext),
|
7573
7574
|
pageContext = _useContext[0],
|
@@ -7600,6 +7601,7 @@ var TablePage2 = function TablePage2(props) {
|
|
7600
7601
|
}, []);
|
7601
7602
|
useEffect(function () {
|
7602
7603
|
setForm(selected);
|
7604
|
+
if (onSelect) onSelect(selected);
|
7603
7605
|
}, [selected]);
|
7604
7606
|
useEffect(function () {
|
7605
7607
|
if (autosave) {
|