<igx-simple-combo> selection cleared when selecting the currently selected item.
Description
If the user selects the currently selected item from the dropdown, the selection is cleared. I can reproduce this in the demo.
- igniteui-angular version: 13.0.11 -> current
- browser: Chrome
Steps to reproduce
- Open Ignite Simple ComboBox demo
- Open the control in the first example
- Select the 'CubicFit' item (or whatever is currently selected)
Result
Selection is cleared.
Expected result
Selection is not cleared.
Attachments
Note
The (selectionChanging) event returns undefined for the newSelection.
Hi @gazoonie, this behavior is by design as we want to have the single selection combo's interactions be as similar as possible to the multi selection combo's and in the multi selection combo, when you perform selection on an already selected item, the item is deselected.
@jackofdiamond5
You guys should probably rethink that behavior. I could understand if there were checkboxes shown in this control doing something like this, because it would make sense to the user. I have never seen a single select combobox with this behavior. In every single other combobox component on the market, when you select the same item in the list it just closes the popup. It's such a standard behavior engrained into millions of people -- why change it? Generally, if users wanted to clear the control, they would click the clear button.
@jackofdiamond5
I agree with @mikerentmeister that this behavior seems off. I went to several of your competitors demos and I couldn't find a single example where the behavior of a single select combobox matched the behavior of your single select combo.
If there are no plans on changing this behavior, would it be possible to have an event emitted when the Clear button is clicked? But I need this event to emit before selectionChanging emits. Or a property in ISimpleComboSelectionChangingEventArgs that indicates the clear button was clicked.
Or, do you have any suggestions for working around this behavior? I want to allow the user to clear the field using the clear button, but if they select the already selected item, I don't want the field to clear. Please advise.
Thank you.
@gazoonie , @mikerentmeister thank you for the input, the behavior was implemented by design, which didn't mean that our interaction design was right in the first place for this particular behavior and we have already updated our specifications so this issue will be addressed and fixed. Thanks once again for the input!
Thank you for the update.
There has been no recent activity and this issue has been marked inactive.
There has been no recent activity and this issue has been marked inactive.
There has been no recent activity and this issue has been marked inactive.
There has been no recent activity and this issue has been marked inactive.
There has been no recent activity and this issue has been marked inactive.
There has been no recent activity and this issue has been marked inactive.