ywana-core8 0.0.54 → 0.0.58
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 +17 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.modern.js +17 -3
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +17 -3
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/domain/TablePage.js +8 -2
- package/src/html/button.js +1 -1
- package/src/html/icon.js +1 -1
package/dist/index.modern.js
CHANGED
@@ -150,7 +150,7 @@ var Icon = function Icon(_ref) {
|
|
150
150
|
function click(event) {
|
151
151
|
event.stopPropagation();
|
152
152
|
event.preventDefault();
|
153
|
-
if (action) action();
|
153
|
+
if (action) action(event);
|
154
154
|
}
|
155
155
|
|
156
156
|
var clicker = clickable ? "clickable" : "";
|
@@ -188,7 +188,9 @@ var Button$1 = function Button(_ref) {
|
|
188
188
|
onClick: click
|
189
189
|
}, icon ? /*#__PURE__*/React.createElement(Icon, {
|
190
190
|
icon: icon,
|
191
|
-
size: "small"
|
191
|
+
size: "small",
|
192
|
+
clickable: true,
|
193
|
+
action: click
|
192
194
|
}) : null, /*#__PURE__*/React.createElement("span", null, label));
|
193
195
|
};
|
194
196
|
|
@@ -4247,6 +4249,18 @@ var TableEditor = function TableEditor(props) {
|
|
4247
4249
|
setPageContext(Object.assign({}, pageContext));
|
4248
4250
|
}
|
4249
4251
|
|
4252
|
+
function run(action) {
|
4253
|
+
action.action(item.id, pageContext, function () {
|
4254
|
+
try {
|
4255
|
+
return Promise.resolve(pageContext.load()).then(function () {
|
4256
|
+
setPageContext(Object.assign({}, pageContext));
|
4257
|
+
});
|
4258
|
+
} catch (e) {
|
4259
|
+
return Promise.reject(e);
|
4260
|
+
}
|
4261
|
+
});
|
4262
|
+
}
|
4263
|
+
|
4250
4264
|
function renderGroups() {
|
4251
4265
|
var items = filter ? filter(all) : all;
|
4252
4266
|
var groups = items.reduce(function (groups, filter) {
|
@@ -4282,7 +4296,7 @@ var TableEditor = function TableEditor(props) {
|
|
4282
4296
|
clickable: true,
|
4283
4297
|
size: "small",
|
4284
4298
|
action: function action() {
|
4285
|
-
_action
|
4299
|
+
return run(_action);
|
4286
4300
|
}
|
4287
4301
|
});
|
4288
4302
|
}) : [];
|