@gravity-ui/dashkit 8.22.1-beta.1 → 8.23.0

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.
@@ -28,13 +28,13 @@ class MobileLayout extends react_1.default.PureComponent {
28
28
  let indexOffset = 0;
29
29
  return (react_1.default.createElement("div", { className: b() }, groups.map((group) => {
30
30
  const groupId = group.id || constants_1.DEFAULT_GROUP;
31
- const items = sortedItems[groupId];
32
- const children = (items || []).map((item, index) => {
31
+ const items = sortedItems[groupId] || [];
32
+ const children = items.map((item, index) => {
33
33
  const isItemWithActiveAutoheight = item.id in this.state.itemsWithActiveAutoheight;
34
34
  return (react_1.default.createElement("div", { className: b('item', { autoheight: isItemWithActiveAutoheight }), key: item.id },
35
35
  react_1.default.createElement(Item_1.default, { id: item.id, item: item, layout: layout, shouldItemUpdate: false, adjustWidgetLayout: this.getMemoAdjustWidgetLayout(item.id), forwardedPluginRef: this.getMemoForwardRefCallback(indexOffset + index), onItemMountChange: this.context.onItemMountChange, onItemRender: this.context.onItemRender })));
36
36
  });
37
- indexOffset += (items === null || items === void 0 ? void 0 : items.length) || 0;
37
+ indexOffset += items.length;
38
38
  if (group.render) {
39
39
  return group.render(groupId, children, {
40
40
  isMobile: true,
@@ -26,13 +26,13 @@ class MobileLayout extends React.PureComponent {
26
26
  let indexOffset = 0;
27
27
  return (React.createElement("div", { className: b() }, groups.map((group) => {
28
28
  const groupId = group.id || DEFAULT_GROUP;
29
- const items = sortedItems[groupId];
30
- const children = (items || []).map((item, index) => {
29
+ const items = sortedItems[groupId] || [];
30
+ const children = items.map((item, index) => {
31
31
  const isItemWithActiveAutoheight = item.id in this.state.itemsWithActiveAutoheight;
32
32
  return (React.createElement("div", { className: b('item', { autoheight: isItemWithActiveAutoheight }), key: item.id },
33
33
  React.createElement(Item, { id: item.id, item: item, layout: layout, shouldItemUpdate: false, adjustWidgetLayout: this.getMemoAdjustWidgetLayout(item.id), forwardedPluginRef: this.getMemoForwardRefCallback(indexOffset + index), onItemMountChange: this.context.onItemMountChange, onItemRender: this.context.onItemRender })));
34
34
  });
35
- indexOffset += (items === null || items === void 0 ? void 0 : items.length) || 0;
35
+ indexOffset += items.length;
36
36
  if (group.render) {
37
37
  return group.render(groupId, children, {
38
38
  isMobile: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gravity-ui/dashkit",
3
- "version": "8.22.1-beta.1",
3
+ "version": "8.23.0",
4
4
  "description": "Library for rendering dashboard grid layout",
5
5
  "license": "MIT",
6
6
  "repository": {