@gravity-ui/dashkit 8.5.0-beta.0 → 8.5.0-beta.1
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.
|
@@ -136,7 +136,15 @@ function useMemoStateContext(props) {
|
|
|
136
136
|
const resultLayout = react_1.default.useMemo(() => {
|
|
137
137
|
return props.layout.map((item) => {
|
|
138
138
|
if (item.i in adjustedLayouts.current) {
|
|
139
|
-
|
|
139
|
+
// eslint-disable-next-line no-unused-vars
|
|
140
|
+
const _a = adjustedLayouts.current[item.i] || {}, { parent } = _a, adjustedItem = tslib_1.__rest(_a, ["parent"]);
|
|
141
|
+
adjustedItem.w = item.w;
|
|
142
|
+
adjustedItem.x = item.x;
|
|
143
|
+
adjustedItem.y = item.y;
|
|
144
|
+
if (item.parent) {
|
|
145
|
+
adjustedItem.parent = item.parent;
|
|
146
|
+
}
|
|
147
|
+
return adjustedItem;
|
|
140
148
|
}
|
|
141
149
|
else {
|
|
142
150
|
return Object.assign({}, item);
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { __rest } from "tslib";
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import isEqual from 'lodash/isEqual';
|
|
3
4
|
import pick from 'lodash/pick';
|
|
@@ -132,7 +133,15 @@ function useMemoStateContext(props) {
|
|
|
132
133
|
const resultLayout = React.useMemo(() => {
|
|
133
134
|
return props.layout.map((item) => {
|
|
134
135
|
if (item.i in adjustedLayouts.current) {
|
|
135
|
-
|
|
136
|
+
// eslint-disable-next-line no-unused-vars
|
|
137
|
+
const _a = adjustedLayouts.current[item.i] || {}, { parent } = _a, adjustedItem = __rest(_a, ["parent"]);
|
|
138
|
+
adjustedItem.w = item.w;
|
|
139
|
+
adjustedItem.x = item.x;
|
|
140
|
+
adjustedItem.y = item.y;
|
|
141
|
+
if (item.parent) {
|
|
142
|
+
adjustedItem.parent = item.parent;
|
|
143
|
+
}
|
|
144
|
+
return adjustedItem;
|
|
136
145
|
}
|
|
137
146
|
else {
|
|
138
147
|
return Object.assign({}, item);
|