Skip to content

Commit

Permalink
feat: add loading to entities dependency array
Browse files Browse the repository at this point in the history
  • Loading branch information
mfanselmo committed Oct 10, 2024
1 parent 8835970 commit 515e567
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/ui/src/DataTable/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,9 @@ const DataTable = ({

const _entities = useMemo(
() => (reduxFormEntities?.length ? reduxFormEntities : _origEntities) || [],
[_origEntities, reduxFormEntities]
// Added isLoading to the dependencies because we need to update the entities when the data is loading, which sometimes is a proxy
// eslint-disable-next-line react-hooks/exhaustive-deps
[_origEntities, reduxFormEntities, isLoading]
);

const entities = useDeepEqualMemo(_entities);
Expand Down

0 comments on commit 515e567

Please sign in to comment.