fix collection reanme value pre filled with existing name
This commit is contained in:
parent
49ca0b647c
commit
0761f2bdea
|
@ -50,6 +50,7 @@ export default function CollectionNamer({ attributes, ...props }: Props) {
|
|||
fieldType="text"
|
||||
buttonText={attributes.buttonText}
|
||||
placeholder={constants.ENTER_ALBUM_NAME}
|
||||
initialValue={attributes.autoFilledName}
|
||||
/>
|
||||
</DialogBox>
|
||||
);
|
||||
|
|
|
@ -19,6 +19,7 @@ export interface SingleInputFormProps {
|
|||
placeholder: string;
|
||||
buttonText: string;
|
||||
customSubmitButton?: any;
|
||||
initialValue?: string;
|
||||
}
|
||||
|
||||
export default function SingleInputForm(props: SingleInputFormProps) {
|
||||
|
@ -67,7 +68,7 @@ export default function SingleInputForm(props: SingleInputFormProps) {
|
|||
|
||||
return (
|
||||
<Formik<formValues>
|
||||
initialValues={{ inputValue: '' }}
|
||||
initialValues={{ inputValue: props.initialValue ?? '' }}
|
||||
onSubmit={submitForm}
|
||||
validationSchema={validationSchema}
|
||||
validateOnChange={false}
|
||||
|
|
Loading…
Reference in a new issue