@gravity-ui/dashkit 8.1.0-beta.2 → 8.1.0-beta.3

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.
@@ -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 (!dragProps && temporaryLayout === null)
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, temporaryLayout, props.registerManager]);
163
+ }, [dragProps, props.registerManager]);
163
164
  const onDropDragOver = react_1.default.useCallback(() => {
164
165
  if (temporaryLayout) {
165
166
  resetTemporaryLayout();
@@ -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 (!dragProps && temporaryLayout === null)
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, temporaryLayout, props.registerManager]);
159
+ }, [dragProps, props.registerManager]);
159
160
  const onDropDragOver = React.useCallback(() => {
160
161
  if (temporaryLayout) {
161
162
  resetTemporaryLayout();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gravity-ui/dashkit",
3
- "version": "8.1.0-beta.2",
3
+ "version": "8.1.0-beta.3",
4
4
  "description": "Library for rendering dashboard grid layout",
5
5
  "license": "MIT",
6
6
  "repository": {