Minor Changes
-
29559daThanks
@segunadebayo! - AddallowDuplicatesprop to allow duplicate tags (fixes #78,
#2928).When
allowDuplicates: true, the same tag can be added multiple times. Previously, duplicates were always prevented
internally, sovalidatereturningtruedid not allow duplicate tags to be added.Supported use cases:
- Sentence builders — Build phrases from repeatable tokens (e.g.
"Hello",","," ","world"). Tokens can
appear multiple times with different separators per item. - Repeatable tokens — Predefined values that users may select multiple times (e.g.
"a","a","b"). - Validate-controlled behavior — Use
validateto control what gets added without implicit deduplication. When
validatereturnstrue, the tag is added as-is.
useMachine(tagsInput.machine, { allowDuplicates: true, })
- Sentence builders — Build phrases from repeatable tokens (e.g.
Patch Changes
- Updated dependencies [
7edfd5e]:- @zag-js/dom-query@1.36.0
- @zag-js/core@1.36.0
- @zag-js/auto-resize@1.36.0
- @zag-js/interact-outside@1.36.0
- @zag-js/anatomy@1.36.0
- @zag-js/types@1.36.0
- @zag-js/utils@1.36.0
- @zag-js/live-region@1.36.0