Use formik for scene edit (#1429)

* Use formik for scene edit panel
* Fix unsetting rating
* Disable save if not dirty
* Movie image fixes
This commit is contained in:
WithoutPants
2021-06-02 08:33:38 +10:00
committed by GitHub
parent 975343d2e9
commit 1bb5de12e3
9 changed files with 484 additions and 409 deletions

View File

@@ -8,6 +8,7 @@ interface IProps {
isEditing: boolean;
onToggleEdit: () => void;
onSave: () => void;
saveDisabled?: boolean;
onDelete: () => void;
onAutoTag?: () => void;
onImageChange: (event: React.FormEvent<HTMLInputElement>) => void;
@@ -39,7 +40,12 @@ export const DetailsEditNavbar: React.FC<IProps> = (props: IProps) => {
if (!props.isEditing) return;
return (
<Button variant="success" className="save" onClick={() => props.onSave()}>
<Button
variant="success"
className="save"
disabled={props.saveDisabled}
onClick={() => props.onSave()}
>
Save
</Button>
);