es-grid-template 1.9.74 → 1.9.76
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.
|
@@ -196,10 +196,10 @@ export declare const fixColumnsLeft: <RecordType>(columns: ColumnTable<RecordTyp
|
|
|
196
196
|
value: any;
|
|
197
197
|
rowData: RecordType;
|
|
198
198
|
}) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | import("react").ReactNode);
|
|
199
|
-
onCellStyles?: Omit<CSSProperties, "left" | "right" | "position" | "display" | "
|
|
200
|
-
onCellHeaderStyles?: Omit<CSSProperties, "left" | "right" | "position" | "display" | "
|
|
199
|
+
onCellStyles?: Omit<CSSProperties, "left" | "right" | "position" | "display" | "width" | "minWidth"> | ((cellValue: any, cell: import("@tanstack/react-table").Cell<RecordType, unknown>) => Omit<CSSProperties, "left" | "right" | "position" | "display" | "width" | "minWidth">);
|
|
200
|
+
onCellHeaderStyles?: Omit<CSSProperties, "left" | "right" | "position" | "display" | "width" | "minWidth"> | ((cell: import("@tanstack/react-table").Header<RecordType, unknown>) => Omit<CSSProperties, "left" | "right" | "position" | "display" | "width" | "minWidth">);
|
|
201
201
|
onCell?: (rowData: RecordType, index: number) => import("react").TdHTMLAttributes<HTMLTableCellElement>;
|
|
202
|
-
onCellFooterStyles?: Omit<CSSProperties, "left" | "right" | "position" | "display" | "
|
|
202
|
+
onCellFooterStyles?: Omit<CSSProperties, "left" | "right" | "position" | "display" | "width" | "minWidth"> | ((cellValue: any, cell: import("@tanstack/react-table").Header<RecordType, unknown>) => Omit<CSSProperties, "left" | "right" | "position" | "display" | "width" | "minWidth">);
|
|
203
203
|
getValue?: (row: any, rowIndex: number) => any;
|
|
204
204
|
getCellProps?: (value: any, row: any, rowIndex: number) => import("./../../grid-component/type").CellProps;
|
|
205
205
|
headerCellProps?: import("./../../grid-component/type").CellProps;
|
|
@@ -170,12 +170,17 @@ const Grid = props => {
|
|
|
170
170
|
// debugTable: true
|
|
171
171
|
});
|
|
172
172
|
React.useEffect(() => {
|
|
173
|
+
setIsSelectionChange(prev => ({
|
|
174
|
+
...prev,
|
|
175
|
+
isChange: false
|
|
176
|
+
}));
|
|
173
177
|
if (!isSelectionChange.isChange) {
|
|
174
178
|
if (mergedSelectedKeys.length === 0) {
|
|
175
179
|
setIsSelectionChange(prev => ({
|
|
176
180
|
...prev,
|
|
177
181
|
rowsData: []
|
|
178
182
|
}));
|
|
183
|
+
setRowSelection(convertToObjTrue(mergedSelectedKeys));
|
|
179
184
|
} else {
|
|
180
185
|
const abc = flattenArray(dataSource);
|
|
181
186
|
const selectedKeySet = new Set(mergedSelectedKeys);
|
|
@@ -186,8 +191,14 @@ const Grid = props => {
|
|
|
186
191
|
rowsData: result
|
|
187
192
|
}));
|
|
188
193
|
}
|
|
194
|
+
} else {
|
|
195
|
+
if (mergedSelectedKeys.length === 0) {
|
|
196
|
+
setRowSelection(convertToObjTrue(mergedSelectedKeys));
|
|
197
|
+
}
|
|
189
198
|
}
|
|
190
|
-
}, [mergedSelectedKeys, dataSource]);
|
|
199
|
+
}, [mergedSelectedKeys, dataSource, isSelectionChange.isChange]);
|
|
200
|
+
// }, [mergedSelectedKeys, dataSource])
|
|
201
|
+
|
|
191
202
|
React.useEffect(() => {
|
|
192
203
|
if (defaultFilter) {
|
|
193
204
|
const a = revertConvertFilters(defaultFilter);
|
|
@@ -175,12 +175,17 @@ const Grid = props => {
|
|
|
175
175
|
// debugTable: true
|
|
176
176
|
});
|
|
177
177
|
_react.default.useEffect(() => {
|
|
178
|
+
setIsSelectionChange(prev => ({
|
|
179
|
+
...prev,
|
|
180
|
+
isChange: false
|
|
181
|
+
}));
|
|
178
182
|
if (!isSelectionChange.isChange) {
|
|
179
183
|
if (mergedSelectedKeys.length === 0) {
|
|
180
184
|
setIsSelectionChange(prev => ({
|
|
181
185
|
...prev,
|
|
182
186
|
rowsData: []
|
|
183
187
|
}));
|
|
188
|
+
setRowSelection((0, _utils.convertToObjTrue)(mergedSelectedKeys));
|
|
184
189
|
} else {
|
|
185
190
|
const abc = (0, _utils.flattenArray)(dataSource);
|
|
186
191
|
const selectedKeySet = new Set(mergedSelectedKeys);
|
|
@@ -191,8 +196,14 @@ const Grid = props => {
|
|
|
191
196
|
rowsData: result
|
|
192
197
|
}));
|
|
193
198
|
}
|
|
199
|
+
} else {
|
|
200
|
+
if (mergedSelectedKeys.length === 0) {
|
|
201
|
+
setRowSelection((0, _utils.convertToObjTrue)(mergedSelectedKeys));
|
|
202
|
+
}
|
|
194
203
|
}
|
|
195
|
-
}, [mergedSelectedKeys, dataSource]);
|
|
204
|
+
}, [mergedSelectedKeys, dataSource, isSelectionChange.isChange]);
|
|
205
|
+
// }, [mergedSelectedKeys, dataSource])
|
|
206
|
+
|
|
196
207
|
_react.default.useEffect(() => {
|
|
197
208
|
if (defaultFilter) {
|
|
198
209
|
const a = (0, _utils.revertConvertFilters)(defaultFilter);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "es-grid-template",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.76",
|
|
4
4
|
"description": "es-grid-template",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"@types/styled-components": "5.1.34",
|
|
57
57
|
"@vitest/coverage-v8": "2.0.5",
|
|
58
58
|
"antd-style": "3.7.1",
|
|
59
|
-
"becoxy-icons": "^2.1.
|
|
59
|
+
"becoxy-icons": "^2.1.7",
|
|
60
60
|
"classnames": "2.3.1",
|
|
61
61
|
"dayjs": "^1.11.13",
|
|
62
62
|
"lodash": "4.17.21",
|