diff --git a/.changeset/twelve-tools-buy.md b/.changeset/twelve-tools-buy.md new file mode 100644 index 0000000..7a81081 --- /dev/null +++ b/.changeset/twelve-tools-buy.md @@ -0,0 +1,5 @@ +--- +'@warkypublic/oranguru': patch +--- + +Using the effect of array as feature. diff --git a/src/Gridler/GridlerDataGrid.tsx b/src/Gridler/GridlerDataGrid.tsx index 69f8bba..d58a11b 100644 --- a/src/Gridler/GridlerDataGrid.tsx +++ b/src/Gridler/GridlerDataGrid.tsx @@ -231,7 +231,7 @@ export const GridlerDataGrid = () => { rows = rows.hasIndex(r) ? rows : rows.add(r); } } - + console.log('Debug:onGridSelectionChange', currentSelection, selection); if ( JSON.stringify(currentSelection?.columns) !== JSON.stringify(selection.columns) || JSON.stringify(currentSelection?.rows) !== JSON.stringify(rows) || diff --git a/src/Gridler/components/Computer.tsx b/src/Gridler/components/Computer.tsx index dde3ff9..4ef1167 100644 --- a/src/Gridler/components/Computer.tsx +++ b/src/Gridler/components/Computer.tsx @@ -142,7 +142,7 @@ export const Computer = React.memo(() => { onChange(buffers); } } - }, [JSON.stringify(_gridSelectionRows), getState]); + }, [_gridSelectionRows, _gridSelectionRows?.length, getState]); useEffect(() => { setState(