es-grid-template 1.9.21 → 1.9.22

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.
@@ -194,10 +194,10 @@ export declare const fixColumnsLeft: <RecordType>(columns: ColumnTable<RecordTyp
194
194
  value: any;
195
195
  rowData: RecordType;
196
196
  }) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | import("react").ReactNode);
197
- onCellStyles?: Omit<CSSProperties, "width" | "minWidth" | "left" | "right" | "display" | "position"> | ((cellValue: any, cell: import("@tanstack/react-table").Cell<RecordType, unknown>) => Omit<CSSProperties, "width" | "minWidth" | "left" | "right" | "display" | "position">);
198
- onCellHeaderStyles?: Omit<CSSProperties, "width" | "minWidth" | "left" | "right" | "display" | "position"> | ((cell: import("@tanstack/react-table").Header<RecordType, unknown>) => Omit<CSSProperties, "width" | "minWidth" | "left" | "right" | "display" | "position">);
197
+ onCellStyles?: Omit<CSSProperties, "display" | "left" | "minWidth" | "position" | "right" | "width"> | ((cellValue: any, cell: import("@tanstack/react-table").Cell<RecordType, unknown>) => Omit<CSSProperties, "display" | "left" | "minWidth" | "position" | "right" | "width">);
198
+ onCellHeaderStyles?: Omit<CSSProperties, "display" | "left" | "minWidth" | "position" | "right" | "width"> | ((cell: import("@tanstack/react-table").Header<RecordType, unknown>) => Omit<CSSProperties, "display" | "left" | "minWidth" | "position" | "right" | "width">);
199
199
  onCell?: (rowData: RecordType, index: number) => import("react").TdHTMLAttributes<HTMLTableCellElement>;
200
- onCellFooterStyles?: Omit<CSSProperties, "width" | "minWidth" | "left" | "right" | "display" | "position"> | ((cellValue: any, cell: import("@tanstack/react-table").Header<RecordType, unknown>) => Omit<CSSProperties, "width" | "minWidth" | "left" | "right" | "display" | "position">);
200
+ onCellFooterStyles?: Omit<CSSProperties, "display" | "left" | "minWidth" | "position" | "right" | "width"> | ((cellValue: any, cell: import("@tanstack/react-table").Header<RecordType, unknown>) => Omit<CSSProperties, "display" | "left" | "minWidth" | "position" | "right" | "width">);
201
201
  getValue?: (row: any, rowIndex: number) => any;
202
202
  getCellProps?: (value: any, row: any, rowIndex: number) => import("./../../grid-component/type").CellProps;
203
203
  headerCellProps?: import("./../../grid-component/type").CellProps;
@@ -152,8 +152,8 @@ $cell-index-focus-bg-Dark: #E6EFFD !default;
152
152
  }
153
153
 
154
154
  .#{$prefix}-grid-thead {
155
- // background-color: #ffffff;
156
- background-color: inherit;
155
+ background-color: #ffffff;
156
+ // background-color: inherit;
157
157
  font-weight: 500;
158
158
 
159
159
  .#{$prefix}-grid-cell {
@@ -125,9 +125,9 @@ const Grid = props => {
125
125
  }
126
126
  return true;
127
127
  },
128
- initialState: {
129
- rowSelection: {}
130
- },
128
+ // initialState: {
129
+ // rowSelection: {}
130
+ // },
131
131
  onRowSelectionChange: setRowSelection,
132
132
  // RowSelection
133
133
 
@@ -202,6 +202,14 @@ const Grid = props => {
202
202
  const isEqual = isObjEqual(convertToObjTrue(mergedSelectedKeys), rowSelection);
203
203
  if (!isEqual) {
204
204
  setRowSelection(convertToObjTrue(mergedSelectedKeys));
205
+ // table.setRowSelection(convertToObjTrue(mergedSelectedKeys))
206
+
207
+ if (mergedSelectedKeys.length === 0) {
208
+ setIsSelectionChange(prev => ({
209
+ ...prev,
210
+ rowsData: []
211
+ }));
212
+ }
205
213
  }
206
214
  }, [mergedSelectedKeys]);
207
215
  React.useEffect(() => {
@@ -152,8 +152,8 @@ $cell-index-focus-bg-Dark: #E6EFFD !default;
152
152
  }
153
153
 
154
154
  .#{$prefix}-grid-thead {
155
- // background-color: #ffffff;
156
- background-color: inherit;
155
+ background-color: #ffffff;
156
+ // background-color: inherit;
157
157
  font-weight: 500;
158
158
 
159
159
  .#{$prefix}-grid-cell {
@@ -130,9 +130,9 @@ const Grid = props => {
130
130
  }
131
131
  return true;
132
132
  },
133
- initialState: {
134
- rowSelection: {}
135
- },
133
+ // initialState: {
134
+ // rowSelection: {}
135
+ // },
136
136
  onRowSelectionChange: setRowSelection,
137
137
  // RowSelection
138
138
 
@@ -207,6 +207,14 @@ const Grid = props => {
207
207
  const isEqual = (0, _utils.isObjEqual)((0, _utils.convertToObjTrue)(mergedSelectedKeys), rowSelection);
208
208
  if (!isEqual) {
209
209
  setRowSelection((0, _utils.convertToObjTrue)(mergedSelectedKeys));
210
+ // table.setRowSelection(convertToObjTrue(mergedSelectedKeys))
211
+
212
+ if (mergedSelectedKeys.length === 0) {
213
+ setIsSelectionChange(prev => ({
214
+ ...prev,
215
+ rowsData: []
216
+ }));
217
+ }
210
218
  }
211
219
  }, [mergedSelectedKeys]);
212
220
  _react.default.useEffect(() => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "es-grid-template",
3
- "version": "1.9.21",
3
+ "version": "1.9.22",
4
4
  "description": "es-grid-template",
5
5
  "keywords": [
6
6
  "react",