Closed nikolap closed 3 years ago
Thanks! Have had a play with this and we'd considered doing a multi-version in the past but never got around to it.
What you have there in terms of naming is fine. dropdown
makes sense and having single-dropdown
there for backward compatibility is right.
Comments (I know you said you're not done so you no doubt know about these):
Also, please note that the single-dropdown
component code has changed for the soon-to-be-released re-com version so you'll likely need to address some conflicts :-(
Appreciate the feedback! No worries about the conflicts, I can merge them in.
I'll work cleaning this up and be back with a PR shortly when it's up to snuff.
See #224
In addition to the single-dropdown component, it would be great to have a multi-dropdown component à la the multiple select dropdown from the Bootstrap + Chosen demo.
I've made a first pass attempt at this but need some feedback.
A critical decision made there is to unify
single-dropdown
andmulti-dropdown
into a genericdropdown
function. There remains a deprecatedsingle-dropdown
function accessible in there-com.dropdown
namespace for existing projects, and is referred to inre-com.core
.I also attempted to maximize code reuse by integrating new features required for multi selection into existing
dropdown-top
, andchoice-item
.The cost to doing this is that some args to dropdown become unusable in variations of dropdown. This includes:
filter-box?
: this is always on whenmulti?
is truetitle?
: does nothing currently whenmulti?
is true. Perhaps can be a joined string of all the labels of selected items? Though this seems kind of strange when you have multiple itemsBefore I go any further down the rabbit hole (polishing, styling, etc.), feedback would be appreciated on whether unification into a generic
dropdown
function is a good approach or whether they should be kept as separate components. Also, of course, any thoughts or concerns on the changes made.