ywana-core8 0.0.692 → 0.0.694

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 CHANGED
@@ -3961,9 +3961,12 @@ var Dialog = function Dialog(props) {
3961
3961
  toolbar = props.toolbar,
3962
3962
  children = props.children,
3963
3963
  actions = props.actions,
3964
- className = props.className;
3964
+ className = props.className,
3965
+ onClose = props.onClose;
3965
3966
 
3966
3967
  function close() {
3968
+ if (onClose) onClose();
3969
+
3967
3970
  if (className === "prompt") {
3968
3971
  site.closePromptDialog();
3969
3972
  } else {
@@ -6326,6 +6329,18 @@ var CollectionEditor = function CollectionEditor(props) {
6326
6329
  }
6327
6330
  }
6328
6331
 
6332
+ function renderActions() {
6333
+ if (actions) {
6334
+ return actions.map(function (action) {
6335
+ // clone React action
6336
+ var action2 = React__default["default"].cloneElement(action, {
6337
+ form: form
6338
+ });
6339
+ return action2;
6340
+ });
6341
+ }
6342
+ }
6343
+
6329
6344
  function renderEditor() {
6330
6345
  var content = new Content(schema, form);
6331
6346
 
@@ -6371,7 +6386,7 @@ var CollectionEditor = function CollectionEditor(props) {
6371
6386
  raised: true,
6372
6387
  disabled: !canSave(),
6373
6388
  action: save
6374
- }), actions ? actions : null), renderEditor()) : null;
6389
+ }), renderActions()), renderEditor()) : null;
6375
6390
  };
6376
6391
  /**
6377
6392
  * Collection Context