Replies: 2 comments
-
|
What's the use-case for allowing duplicates in your company's design system? |
Beta Was this translation helpful? Give feedback.
0 replies
-
Basically we have a "sentence" builder component where you can use either predefined tokens or custom values. E.g. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
🚀 Feature request
Current documentation says that if you want to disallow duplicates in TagsInput, you can use
validatefunction prop to implement logic for such case. Unfortunately I found in the Zag repo code that it actually usesuniqinternally 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
uniqor add a prop toallowDuplicatesThank you for the great work in Zag/Ark/Panda <3
Beta Was this translation helpful? Give feedback.
All reactions