mirror of
https://github.com/strapi/strapi.git
synced 2025-09-26 08:52:26 +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,
|
useNotification,
|
||||||
} from '@strapi/helper-plugin';
|
} from '@strapi/helper-plugin';
|
||||||
import { useIntl } from 'react-intl';
|
import { useIntl } from 'react-intl';
|
||||||
import { useMutation } from 'react-query';
|
import { useMutation, useQueryClient } from 'react-query';
|
||||||
|
|
||||||
import { useLicenseLimits } from '../../../../../../hooks/useLicenseLimits';
|
import { useLicenseLimits } from '../../../../../../hooks/useLicenseLimits';
|
||||||
import * as LimitsModal from '../../../../../../pages/SettingsPage/pages/ReviewWorkflows/components/LimitsModal';
|
import * as LimitsModal from '../../../../../../pages/SettingsPage/pages/ReviewWorkflows/components/LimitsModal';
|
||||||
@ -32,6 +32,7 @@ import { STAGE_ATTRIBUTE_NAME } from '../../constants';
|
|||||||
export function StageSelect() {
|
export function StageSelect() {
|
||||||
const { initialData, layout: contentType, isSingleType, onChange } = useCMEditViewDataManager();
|
const { initialData, layout: contentType, isSingleType, onChange } = useCMEditViewDataManager();
|
||||||
const { put } = useFetchClient();
|
const { put } = useFetchClient();
|
||||||
|
const queryClient = useQueryClient();
|
||||||
const { formatMessage } = useIntl();
|
const { formatMessage } = useIntl();
|
||||||
const { formatAPIError } = useAPIErrorHandler();
|
const { formatAPIError } = useAPIErrorHandler();
|
||||||
const toggleNotification = useNotification();
|
const toggleNotification = useNotification();
|
||||||
@ -67,6 +68,8 @@ export function StageSelect() {
|
|||||||
true
|
true
|
||||||
);
|
);
|
||||||
|
|
||||||
|
queryClient.invalidateQueries(['content-manager', typeSlug, uid, entityId, 'stages']);
|
||||||
|
|
||||||
return createdEntity;
|
return createdEntity;
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user