@onehat/ui 0.3.349 → 0.3.350
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
|
@@ -2,6 +2,13 @@ import { useEffect, useState, useRef, } from 'react';
|
|
|
2
2
|
import {
|
|
3
3
|
Button,
|
|
4
4
|
} from 'native-base';
|
|
5
|
+
import {
|
|
6
|
+
ADD,
|
|
7
|
+
EDIT,
|
|
8
|
+
DELETE,
|
|
9
|
+
VIEW,
|
|
10
|
+
DUPLICATE,
|
|
11
|
+
} from '../../../Constants/Commands.js';
|
|
5
12
|
import {
|
|
6
13
|
EDITOR_MODE__VIEW,
|
|
7
14
|
EDITOR_MODE__ADD,
|
|
@@ -365,7 +372,7 @@ export default function withSecondaryEditor(WrappedComponent, isTree = false) {
|
|
|
365
372
|
secondaryDoEdit();
|
|
366
373
|
},
|
|
367
374
|
secondaryDoEditorSave = async (data, e) => {
|
|
368
|
-
let mode =
|
|
375
|
+
let mode = secondaryEditorMode === EDITOR_MODE__ADD ? ADD : EDIT;
|
|
369
376
|
if (canUser && !canUser(mode, secondaryModel)) {
|
|
370
377
|
showPermissionsError(mode, secondaryModel);
|
|
371
378
|
return;
|