New allow-duplicates prop for autocomplete, dropdown and taglist pro inputs #1573
fabiobulgarella
started this conversation in
Ideas
Replies: 0 comments
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.
-
Summary:
Introduce a new
allow-duplicatesprop to the FormKit Proautocomplete,dropdown, andtaglistinputs. This optional boolean property would enable developers to control whether duplicate selections are permitted in these components.Use Case:
Currently, these inputs enforce unique values, which is ideal for many scenarios. However, in cases where repeated selections are meaningful (e.g., tagging duplicate items or selecting identical options for separate purposes), this restriction can limit functionality. Adding
allow-duplicateswould provide greater flexibility and align with diverse application requirements.Proposed Behavior:
When
allow-duplicatesisfalse(default), duplicate values are not permitted, maintaining current behavior.When
allow-duplicatesistrue, users can select or add duplicate values without restriction; in this case check marks should not be shown on the selection list.Benefits:
Enhances component flexibility for broader use cases.
Maintains backward compatibility by defaulting to the existing behavior.
This feature would empower developers to better meet the needs of their applications while preserving the simplicity and reliability of FormKit Pro inputs.
Beta Was this translation helpful? Give feedback.
All reactions