@gravity-ui/dashkit 8.8.0 → 8.8.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.
@@ -165,7 +165,10 @@ class GridLayout extends react_1.default.PureComponent {
165
165
  }, temporaryItem ? { [temporaryItem.i]: temporaryItem } : {});
166
166
  const newItemsLayoutById = newLayout.reduce((memo, item) => {
167
167
  const parent = itemsByGroup[item.i].parent;
168
- memo[item.i] = Object.assign(Object.assign({}, item), { parent });
168
+ memo[item.i] = Object.assign({}, item);
169
+ if (parent) {
170
+ memo[item.i].parent = parent;
171
+ }
169
172
  return memo;
170
173
  }, {});
171
174
  return renderLayout.map((currentItem) => {
@@ -162,7 +162,10 @@ class GridLayout extends React.PureComponent {
162
162
  }, temporaryItem ? { [temporaryItem.i]: temporaryItem } : {});
163
163
  const newItemsLayoutById = newLayout.reduce((memo, item) => {
164
164
  const parent = itemsByGroup[item.i].parent;
165
- memo[item.i] = Object.assign(Object.assign({}, item), { parent });
165
+ memo[item.i] = Object.assign({}, item);
166
+ if (parent) {
167
+ memo[item.i].parent = parent;
168
+ }
166
169
  return memo;
167
170
  }, {});
168
171
  return renderLayout.map((currentItem) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gravity-ui/dashkit",
3
- "version": "8.8.0",
3
+ "version": "8.8.1",
4
4
  "description": "Library for rendering dashboard grid layout",
5
5
  "license": "MIT",
6
6
  "repository": {