Merge pull request #644 from premeaswaran/main

Fixes #637: autofill folder name as collection name
This commit is contained in:
Anoop M D 2023-10-18 11:13:12 +05:30 committed by GitHub
commit e715a47eb6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -76,7 +76,14 @@ const CreateCollection = ({ onClose }) => {
name="collectionName"
ref={inputRef}
className="block textbox mt-2 w-full"
onChange={formik.handleChange}
onChange = {
(e) => {
formik.handleChange(e);
if (formik.values.collectionName === formik.values.collectionFolderName) {
formik.setFieldValue("collectionFolderName", e.target.value);
}
}
}
autoComplete="off"
autoCorrect="off"
autoCapitalize="off"