From ad8e9c25610f9196e607df5fb12e45aa2fb28cb6 Mon Sep 17 00:00:00 2001 From: Prem Kumar Easwaran Date: Tue, 17 Oct 2023 21:07:32 +0530 Subject: [PATCH] Autofill folder name as collection name --- .../src/components/Sidebar/CreateCollection/index.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/bruno-app/src/components/Sidebar/CreateCollection/index.js b/packages/bruno-app/src/components/Sidebar/CreateCollection/index.js index 9f9097637..5c88178a3 100644 --- a/packages/bruno-app/src/components/Sidebar/CreateCollection/index.js +++ b/packages/bruno-app/src/components/Sidebar/CreateCollection/index.js @@ -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"