spectrum-web-components
spectrum-web-components copied to clipboard
Support 'selects="multiple"'
Expected Behaviour
The Picker interface is able to leverage the underlying sp-menu selects="multiple"
functionality and deliver it visually to a visitor.
Actual Behaviour
multiple
has been left out of #1661 for scope control.
I'd expect selected='multiple'
to be simpler to handle in ActionMenu since the selected state doesn't update when a selection is made. My understanding last we talked to design was that Picker
is really designed for single selection, so for the actual control (not PickerBase), I don't think we'd need to add this support unless there's a strong proposal made for why it's needed. I'm guessing SplitButton
is similar.
Yes.
-
sp-action-menu
, kind of a no brainer, just wanted to leave it out for this first pass for the accessibility questions insp-picker
. -
sp-picker
, can support it, but needs design direction. Is it justValue 1, Value 2
, etc. or something more. I think it's fine to add, but with caveats and a little extra love around what we do to accessibly surface that data for screen readers. -
sp-split-button
, I'm not sure it should ever be multiple. You either get no selection withtype="more"
or you get a selection by default...could be convinced if you saw a better path forward there.
I talked a bunch of designers in AD-Design team and asked them if some product is using a similar component and so far everyone wants either a combobox pattern or a tagfield pattern. Not sure if having selects='multiple' makes sense in a picker. Need a solid usecase before moving forward with this idea