@onehat/ui 0.3.232 → 0.3.234
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
|
@@ -474,11 +474,12 @@ function GridComponent(props) {
|
|
|
474
474
|
rowDragProps.isDragSource = true;
|
|
475
475
|
rowDragProps.dragSourceType = rowDragSourceType;
|
|
476
476
|
if (getRowDragSourceItem) {
|
|
477
|
-
rowDragProps.dragSourceItem = getRowDragSourceItem(item, getIds);
|
|
477
|
+
rowDragProps.dragSourceItem = getRowDragSourceItem(item, getIds, rowDragSourceType);
|
|
478
478
|
} else {
|
|
479
479
|
rowDragProps.dragSourceItem = {
|
|
480
480
|
id: item.id,
|
|
481
481
|
getIds,
|
|
482
|
+
type: rowDragSourceType,
|
|
482
483
|
};
|
|
483
484
|
}
|
|
484
485
|
}
|
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
EDITOR_MODE__ADD,
|
|
8
8
|
EDITOR_MODE__EDIT,
|
|
9
9
|
} from '../../Constants/Editor.js';
|
|
10
|
+
import UiGlobals from '../../UiGlobals.js';
|
|
10
11
|
import _ from 'lodash';
|
|
11
12
|
|
|
12
13
|
export default function withEditor(WrappedComponent, isTree = false) {
|
|
@@ -41,6 +42,7 @@ export default function withEditor(WrappedComponent, isTree = false) {
|
|
|
41
42
|
newEntityDisplayValue,
|
|
42
43
|
newEntityDisplayProperty, // in case the field to set for newEntityDisplayValue is different from model
|
|
43
44
|
defaultValues,
|
|
45
|
+
stayInEditModeOnSelectionChange = false,
|
|
44
46
|
|
|
45
47
|
// withComponent
|
|
46
48
|
self,
|
|
@@ -423,6 +425,16 @@ export default function withEditor(WrappedComponent, isTree = false) {
|
|
|
423
425
|
});
|
|
424
426
|
},
|
|
425
427
|
calculateEditorMode = (isIgnoreNextSelectionChange = false) => {
|
|
428
|
+
|
|
429
|
+
let doStayInEditModeOnSelectionChange = stayInEditModeOnSelectionChange;
|
|
430
|
+
if (!_.isNil(UiGlobals.stayInEditModeOnSelectionChange)) {
|
|
431
|
+
// allow global override to for this property
|
|
432
|
+
doStayInEditModeOnSelectionChange = UiGlobals.stayInEditModeOnSelectionChange;
|
|
433
|
+
}
|
|
434
|
+
if (doStayInEditModeOnSelectionChange) {
|
|
435
|
+
isIgnoreNextSelectionChange = true;
|
|
436
|
+
}
|
|
437
|
+
|
|
426
438
|
// calculateEditorMode gets called only on selection changes
|
|
427
439
|
let mode;
|
|
428
440
|
if (isIgnoreNextSelectionChange) {
|