@gravity-ui/react-data-table 2.1.0 → 2.1.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.
@@ -123,7 +123,7 @@ class TableHead extends React.Component {
123
123
  };
124
124
  };
125
125
  this._getRenderedColumn = (index) => {
126
- if (index) {
126
+ if (index !== undefined) {
127
127
  return this.renderedColumns[index];
128
128
  }
129
129
  return undefined;
@@ -2,7 +2,7 @@ import type { Column, HandleResize } from './types';
2
2
  export type ColumnWidthByName = Record<string, number>;
3
3
  export type SaveColumnWidthByName = (data: ColumnWidthByName) => void;
4
4
  export type GetSavedColumnWidthByName = () => ColumnWidthByName;
5
- export declare function updateColumnsWidth<T>(columns: Column<T>[], columnsWidthSetup: ColumnWidthByName, defaultResizeable?: boolean): Column<T>[];
5
+ export declare function updateColumnsWidth<T>(columns: Column<T>[], columnsWidthSetup: ColumnWidthByName): Column<T>[];
6
6
  export declare function useTableResize({ saveSizes, getSizes, }: {
7
7
  saveSizes: SaveColumnWidthByName;
8
8
  getSizes: GetSavedColumnWidthByName;
@@ -1,10 +1,10 @@
1
1
  import React from 'react';
2
- export function updateColumnsWidth(columns, columnsWidthSetup, defaultResizeable = false) {
2
+ export function updateColumnsWidth(columns, columnsWidthSetup) {
3
3
  return columns.map((column) => {
4
4
  var _a;
5
5
  let sub;
6
6
  if (column.sub) {
7
- sub = updateColumnsWidth(column.sub, columnsWidthSetup, defaultResizeable);
7
+ sub = updateColumnsWidth(column.sub, columnsWidthSetup);
8
8
  }
9
9
  const newWidth = (_a = columnsWidthSetup[column.name]) !== null && _a !== void 0 ? _a : column.width;
10
10
  return Object.assign(Object.assign({}, column), { width: newWidth, sub });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gravity-ui/react-data-table",
3
- "version": "2.1.0",
3
+ "version": "2.1.1",
4
4
  "description": "DataTable component",
5
5
  "keywords": [
6
6
  "table"