Closed Conaws closed 3 years ago
In terms of API, I would suggest the following (starting with what is already there):
:selections rename to :model
:suggestions
:save! rename to :on-change
:on-delete! rename to :on-delete
:placeholder
:highlight-class
:item-class
:list-class
Additional:
:rigid? true means only allow values from :suggestions
:width default is to take up width of container as is currently the case
:height default should be default height of input-text, ideally tags should scale nicely within this height
:disabled? common in re-com components
:class apply to the outer h-box
:style apply to the outer h-box
:attr apply to the outer h-box
Observation: Looks like #150 is overlapping with the functionality of this PR.
Thanks anyway for submitting this @Conaws 👍
Submitting a component for chosen style multi-complete with typeahead. It doesn't yet totally match the look and feel of all the other re-com components, and in this implementation it accepts all the options as a map -- rather than the re-com style of validating arguments separately.
See example here https://github.com/Day8/re-com/issues/115
In my use case I wanted users to be able to submit new options, so that is the default behavior, I imagine that that might be an option that could be disabled.
I'll be offline for the next few weeks, but figured if someone else had interest they could convert it from using an options map to following the re-com format. Otherwise, very open to suggestions about what the options the component should accept, and can complete the conversion later.