Skip to content

Commit

Permalink
[DataGrid] Clear timers on unmount (#15620)
Browse files Browse the repository at this point in the history
  • Loading branch information
cherniavskii authored Nov 26, 2024
1 parent 80a1e03 commit aa7f984
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ function GridToolbarQuickFilter(props: GridToolbarQuickFilterProps) {
() => debounce(updateSearchValue, debounceMs),
[updateSearchValue, debounceMs],
);
React.useEffect(() => debouncedUpdateSearchValue.clear, [debouncedUpdateSearchValue]);

const handleSearchValueChange = React.useCallback(
(event: React.ChangeEvent<HTMLInputElement>) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ export function useGridDimensions(
() => throttle(setSavedSize, props.resizeThrottleMs),
[props.resizeThrottleMs],
);
React.useEffect(() => debouncedSetSavedSize.clear, [debouncedSetSavedSize]);

const getRootDimensions = () => apiRef.current.state.dimensions;

Expand Down

0 comments on commit aa7f984

Please sign in to comment.