-
-
Notifications
You must be signed in to change notification settings - Fork 242
Description
🚀 Feature request
Current documentation says that if you want to disallow duplicates in TagsInput, you can use validate function prop to implement logic for such case. Unfortunately I found in the Zag repo code that it actually uses uniq internally to remove any duplicates when adding new value. Would it be possible to have either this "default" solution removed or add a prop to allow duplicates? This should also work then for pasting the values. We need it for our company internal DS.
Code issue in packages/machines/tags-input/src/tags-input.machine.ts:
https://github.com/chakra-ui/zag/blob/main/packages/machines/tags-input/src/tags-input.machine.ts#L615
🧱 Problem Statement / Justification
We need an option to allow duplicates to be used.
✅ Proposed solution or API
Either remove the use of uniq or add a prop to allowDuplicates
Thank you for the great work in Zag/Ark/Panda <3