day8 / re-com

A ClojureScript library of reusable components for Reagent
https://re-com.day8.com.au
MIT License
796 stars 147 forks source link

tag-dropdown: should expose underlying selection-list prop :required? #233

Closed hipitihop closed 3 years ago

hipitihop commented 3 years ago

The tag-dropdown uses the selection-list component when displaying dropped down choices, which supports blocking the removal of the last element when :required? is set to true. tag-dropdown should expose this property in it's own API and pass it through to the choices component. Further, it should take this into consideration when rendering :unselect-buttons? true such that if both props are true and there is only one tag selected, the unselect button is not rendered to prevent the user from removing the last one.