@onehat/ui 0.3.150 → 0.3.151

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onehat/ui",
3
- "version": "0.3.150",
3
+ "version": "0.3.151",
4
4
  "description": "Base UI for OneHat apps",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -42,7 +42,8 @@ export default function withWindowedEditor(WrappedComponent, isTree = false) {
42
42
  h,
43
43
 
44
44
  ...propsToPass
45
- } = props;
45
+ } = props,
46
+ onEditorCancel = props.onEditorCancel;
46
47
 
47
48
  if (!Editor) {
48
49
  throw Error('Editor is not defined');
@@ -53,7 +54,7 @@ export default function withWindowedEditor(WrappedComponent, isTree = false) {
53
54
  {isEditorShown &&
54
55
  <Modal
55
56
  isOpen={true}
56
- onClose={() => setIsEditorShown(false)}
57
+ onClose={onEditorCancel}
57
58
  >
58
59
  <Editor
59
60
  editorType={EDITOR_TYPE__WINDOWED}