Skip to content

Commit

Permalink
Merge pull request #261 from Dias999/feature/Fix_UseCrudControls_Tabl…
Browse files Browse the repository at this point in the history
…eRefresh

feat: useCrudControls - fix refreshTable
  • Loading branch information
andreneto97 authored Oct 18, 2024
2 parents 803af55 + 1bc67bf commit da3fe2c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/react-material-ui/src/modules/crud/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -131,16 +131,16 @@ const CrudModule = (props: ModuleProps) => {
isPending,
refresh,
} = useTableReturn;
const { refreshTable, dispatch } = useCrudControls();
const { dispatch } = useCrudControls();

useEffect(() => {
if (!refreshTable && refresh && dispatch) {
if (refresh && dispatch) {
dispatch({
type: ControlsActionEnum.ASSIGN_REFRESH_TABLE,
payload: refresh,
});
}
}, [refresh]);
}, [tableQueryState]);

useEffect(() => {
if (dispatch) {
Expand Down

0 comments on commit da3fe2c

Please sign in to comment.