Skip to content

Commit

Permalink
update invalidation
Browse files Browse the repository at this point in the history
  • Loading branch information
vashjs committed Oct 27, 2024
1 parent fa0b643 commit cf34824
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import PropTypes from 'prop-types';
import {
FormattedMessage,
} from 'react-intl';
import { useQueryClient } from 'react-query';

import {
MessageBanner,
Expand All @@ -24,7 +23,6 @@ import {
PAGINATION_CONFIG
} from '../../../../constants';
import {
BULK_OPERATION_DETAILS_KEY,
PREVIEW_MODAL_KEY,
useBulkOperationDetails,
useRecordsPreview
Expand All @@ -39,7 +37,6 @@ export const BulkEditPreviewModalList = ({
isPreviewEnabled,
onPreviewError,
}) => {
const queryClient = useQueryClient();
const { id: bulkOperationId } = usePathParams('/bulk-edit/:id');
const { visibleColumns } = useContext(RootContext);
const { currentRecordType } = useSearchParams();
Expand Down Expand Up @@ -77,7 +74,6 @@ export const BulkEditPreviewModalList = ({
},
onSettled: () => {
setPreviewLoaded(true);
queryClient.invalidateQueries(BULK_OPERATION_DETAILS_KEY);
}
},
...pagination,
Expand Down
1 change: 1 addition & 0 deletions src/hooks/useConfirmChanges.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ export const useConfirmChanges = ({

const closePreviewModal = () => {
setIsPreviewModalOpened(false);
queryClient.resetQueries(BULK_OPERATION_DETAILS_KEY);
};

const confirmChanges = (payload) => {
Expand Down

0 comments on commit cf34824

Please sign in to comment.