iron-menu-behavior icon indicating copy to clipboard operation
iron-menu-behavior copied to clipboard

Allow deselection

Open ebidel opened this issue 9 years ago • 2 comments

I find myself increasingly wanting a way to deselect an item once it is selected. Currently, the only want to do this is use mult, but allowing multiple selection is not always desired.

In the past, I've worked around this by using the iron-deselected event manually deselected the item in js :(

ebidel avatar Apr 13 '16 22:04 ebidel

selector.select(undefined) should do it. There's kind of a mismatch between IronSelectableBehavior and IronMultiSelectable behavior though: .select(undefined) for a multi-selectable will actually push undefined to selectedValues. :/

bicknellr avatar Apr 18 '16 20:04 bicknellr

Calling this p2 just because there's a pretty straight-forward workaround but this is staying open / should be kept in mind when we get to the point that we can make API changes. The current state of iron-selector is pretty poorly defined and crappy to work with concerning this case. I think IronSelectableBehavior and IronMultiSelectableBehavior might need to be split a bit more than they are now.

bicknellr avatar Apr 19 '16 17:04 bicknellr