hasanharman / form-builder

A dynamic form-building tool that allows users to create, customize, and validate forms seamlessly within web applications.
https://www.shadcn-form.com/
GNU Affero General Public License v3.0
1.34k stars 135 forks source link

fix: improve default name to avoid same key in the list after delete #9

Closed fvitas closed 1 month ago

fvitas commented 1 month ago

Hey, I noticed a bug in the form builder.

-> If you delete an input field from the middle of the list and then add a new one, two items end up with the same key, and it stops working properly.

Maybe using crypto.randomUUID() would be better for unique keys, but since you're using names, this might look cleaner.

vercel[bot] commented 1 month ago

@fvitas is attempting to deploy a commit to the hasanharman's projects Team on Vercel.

A member of the Team first needs to authorize it.

hasanharman commented 1 month ago

Thanks a lot for noticing this.