Fix save disabled when creating new object with name (#3409)

* Dirty when creating with name
* Fix prompt on tag save
This commit is contained in:
WithoutPants
2023-02-11 08:59:08 +11:00
committed by GitHub
parent 18b44e9381
commit 692c1e55ac
5 changed files with 25 additions and 15 deletions

View File

@@ -120,6 +120,11 @@ export const GalleryEditPanel: React.FC<
onSubmit: (values) => onSave(getGalleryInput(values)),
});
// always dirty if creating a new gallery with a title
if (isNew && gallery?.title) {
formik.dirty = true;
}
function setRating(v: number) {
formik.setFieldValue("rating100", v);
}