@gravity-ui/dashkit 8.1.0-beta.2 → 8.1.0-beta.4
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.
|
@@ -135,7 +135,7 @@ class GridLayout extends react_1.default.PureComponent {
|
|
|
135
135
|
}
|
|
136
136
|
renderTemporaryPlaceholder() {
|
|
137
137
|
const { temporaryLayout, dragOverPlugin, noOverlay, draggableHandleClassName } = this.context;
|
|
138
|
-
if (!temporaryLayout) {
|
|
138
|
+
if (!temporaryLayout || !dragOverPlugin) {
|
|
139
139
|
return null;
|
|
140
140
|
}
|
|
141
141
|
const id = constants_1.TEMPORARY_ITEM_ID;
|
|
@@ -148,8 +148,9 @@ function useMemoStateContext(props) {
|
|
|
148
148
|
}, []);
|
|
149
149
|
const dragProps = dndContext === null || dndContext === void 0 ? void 0 : dndContext.dragProps;
|
|
150
150
|
const dragOverPlugin = react_1.default.useMemo(() => {
|
|
151
|
-
if (
|
|
151
|
+
if (dragProps === null) {
|
|
152
152
|
return null;
|
|
153
|
+
}
|
|
153
154
|
const pluginType = dragProps.type;
|
|
154
155
|
if (props.registerManager.check(pluginType)) {
|
|
155
156
|
return props.registerManager.getItem(pluginType);
|
|
@@ -159,7 +160,7 @@ function useMemoStateContext(props) {
|
|
|
159
160
|
console.error(`Uknown pluginType: ${pluginType}`);
|
|
160
161
|
return null;
|
|
161
162
|
}
|
|
162
|
-
}, [dragProps,
|
|
163
|
+
}, [dragProps, props.registerManager]);
|
|
163
164
|
const onDropDragOver = react_1.default.useCallback(() => {
|
|
164
165
|
if (temporaryLayout) {
|
|
165
166
|
resetTemporaryLayout();
|
|
@@ -132,7 +132,7 @@ class GridLayout extends React.PureComponent {
|
|
|
132
132
|
}
|
|
133
133
|
renderTemporaryPlaceholder() {
|
|
134
134
|
const { temporaryLayout, dragOverPlugin, noOverlay, draggableHandleClassName } = this.context;
|
|
135
|
-
if (!temporaryLayout) {
|
|
135
|
+
if (!temporaryLayout || !dragOverPlugin) {
|
|
136
136
|
return null;
|
|
137
137
|
}
|
|
138
138
|
const id = TEMPORARY_ITEM_ID;
|
|
@@ -144,8 +144,9 @@ function useMemoStateContext(props) {
|
|
|
144
144
|
}, []);
|
|
145
145
|
const dragProps = dndContext === null || dndContext === void 0 ? void 0 : dndContext.dragProps;
|
|
146
146
|
const dragOverPlugin = React.useMemo(() => {
|
|
147
|
-
if (
|
|
147
|
+
if (dragProps === null) {
|
|
148
148
|
return null;
|
|
149
|
+
}
|
|
149
150
|
const pluginType = dragProps.type;
|
|
150
151
|
if (props.registerManager.check(pluginType)) {
|
|
151
152
|
return props.registerManager.getItem(pluginType);
|
|
@@ -155,7 +156,7 @@ function useMemoStateContext(props) {
|
|
|
155
156
|
console.error(`Uknown pluginType: ${pluginType}`);
|
|
156
157
|
return null;
|
|
157
158
|
}
|
|
158
|
-
}, [dragProps,
|
|
159
|
+
}, [dragProps, props.registerManager]);
|
|
159
160
|
const onDropDragOver = React.useCallback(() => {
|
|
160
161
|
if (temporaryLayout) {
|
|
161
162
|
resetTemporaryLayout();
|