Autofill folder name as collection name

This commit is contained in:
Prem Kumar Easwaran 2023-10-17 21:07:32 +05:30
parent b05d8d7da0
commit ad8e9c2561

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"