kostylfix types admin
This commit is contained in:
@@ -27,9 +27,11 @@ export const VersionList: React.FC<EditViewContext> = ({
|
|||||||
|
|
||||||
const handleSelectVersion = async (version: ContentVersion) => {
|
const handleSelectVersion = async (version: ContentVersion) => {
|
||||||
if (version.id === currentVersion.id) {
|
if (version.id === currentVersion.id) {
|
||||||
|
// @ts-expect-error form is not typed
|
||||||
ctx.form.resetForm();
|
ctx.form.resetForm();
|
||||||
} else {
|
} else {
|
||||||
const preparedData = await prepareVersionFormData(version.id, locale);
|
const preparedData = await prepareVersionFormData(version.id, locale);
|
||||||
|
// @ts-expect-error form is not typed
|
||||||
ctx.form.setValues(preparedData);
|
ctx.form.setValues(preparedData);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -50,6 +52,7 @@ export const VersionList: React.FC<EditViewContext> = ({
|
|||||||
)) &&
|
)) &&
|
||||||
document?.status !== 'modified';
|
document?.status !== 'modified';
|
||||||
|
|
||||||
|
// @ts-expect-error form is not typed
|
||||||
const shouldRefetchVersions = isDocumentPublished && !ctx.form.isSubmitting;
|
const shouldRefetchVersions = isDocumentPublished && !ctx.form.isSubmitting;
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|||||||
Reference in New Issue
Block a user