Refactor: Improve column state change handling in TableComponent
This commit is contained in:
parent
98175bc72c
commit
5e07d99cc6
1 changed files with 2 additions and 4 deletions
|
|
@ -139,10 +139,8 @@ const TableComponent = forwardRef<
|
||||||
onGridReady={onGridReady}
|
onGridReady={onGridReady}
|
||||||
onColumnMoved={onColumnMoved}
|
onColumnMoved={onColumnMoved}
|
||||||
onStateUpdated={(e) => {
|
onStateUpdated={(e) => {
|
||||||
if (
|
console.log(e);
|
||||||
e.sources.includes("columnVisibility") ||
|
if (e.sources.some((source) => source.includes("column"))) {
|
||||||
e.sources.includes("columnOrder")
|
|
||||||
) {
|
|
||||||
setColumnStateChange(true);
|
setColumnStateChange(true);
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue