mirror of
https://github.com/strapi/strapi.git
synced 2025-09-25 16:29:34 +00:00
fix(ee): invalidate stages list when stage is changed
This commit is contained in:
parent
a4981eb020
commit
54828682e2
@ -17,7 +17,7 @@ import {
|
||||
useNotification,
|
||||
} from '@strapi/helper-plugin';
|
||||
import { useIntl } from 'react-intl';
|
||||
import { useMutation } from 'react-query';
|
||||
import { useMutation, useQueryClient } from 'react-query';
|
||||
|
||||
import { useLicenseLimits } from '../../../../../../hooks/useLicenseLimits';
|
||||
import * as LimitsModal from '../../../../../../pages/SettingsPage/pages/ReviewWorkflows/components/LimitsModal';
|
||||
@ -32,6 +32,7 @@ import { STAGE_ATTRIBUTE_NAME } from '../../constants';
|
||||
export function StageSelect() {
|
||||
const { initialData, layout: contentType, isSingleType, onChange } = useCMEditViewDataManager();
|
||||
const { put } = useFetchClient();
|
||||
const queryClient = useQueryClient();
|
||||
const { formatMessage } = useIntl();
|
||||
const { formatAPIError } = useAPIErrorHandler();
|
||||
const toggleNotification = useNotification();
|
||||
@ -67,6 +68,8 @@ export function StageSelect() {
|
||||
true
|
||||
);
|
||||
|
||||
queryClient.invalidateQueries(['content-manager', typeSlug, uid, entityId, 'stages']);
|
||||
|
||||
return createdEntity;
|
||||
},
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user