Skip to content

Commit

Permalink
fix DataTable callback dep warnings (#2284)
Browse files Browse the repository at this point in the history
OKTA-747975 fix(odyssey-react-mui): fix data table dep warnings
  • Loading branch information
bryancunningham-okta authored Jul 11, 2024
1 parent 7e4a2ce commit 3a5f748
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions packages/odyssey-react-mui/src/DataTable/DataTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -601,10 +601,11 @@ const DataTable = ({
</Box>
);
}, [
tableInnerContainerWidth,
emptyPlaceholder,
noResultsPlaceholder,
isEmpty,
noResultsPlaceholder,
t,
tableInnerContainerWidth,
]);

const columnIds = useMemo(() => {
Expand Down Expand Up @@ -776,7 +777,15 @@ const DataTable = ({
setIsLoading(false);
}
})();
}, [pagination, columnSorting, search, filters, getData, errorMessageProp]);
}, [
columnSorting,
errorMessageProp,
filters,
getData,
pagination,
search,
t,
]);

useEffect(() => {
if (!initialFilters && filters) {
Expand Down

0 comments on commit 3a5f748

Please sign in to comment.