igniteui-angular icon indicating copy to clipboard operation
igniteui-angular copied to clipboard

IgxSimpleCombo: possibility to not open dropdown on clear

Open Timmeeeey opened this issue 2 years ago • 2 comments

Is your feature request related to a problem? Please describe.

When you clear a IgxSimpleCombo then the dropdown opens. When you clear a IgxCombo then the dropdown doesn't open.

Describe the solution you'd like

It should be possible to configure the IgxSimpleCombo to not open the dropdown on clear.

Timmeeeey avatar Jul 15 '22 14:07 Timmeeeey

Hello @Timmeeeey,

A similar behavior like the one of the IgxCombo could be achieved on application level by using the simple combo’s opening and selectionChanging events and canceling the opening event when the item is deselected, i.e., cleared via the “X” icon. Here could be found a sample demonstrating this approach.

However, this does require additional lines of code and perhaps having a way to configure the simple combo’s dropdown to either open or not is a better option.

RivaIvanova avatar Jul 25 '22 13:07 RivaIvanova

Hi @RivaIvanova, a boolean input like openOnClear would be nice but the code you provided is ok for me. Thank you.

Timmeeeey avatar Jul 25 '22 13:07 Timmeeeey

There has been no recent activity and this issue has been marked inactive.

github-actions[bot] avatar Sep 24 '22 00:09 github-actions[bot]

Hey, @Timmeeeey, as you see there is a PR that adds such options for both igx-combo and igx-simple-combo. However, we are still considering if adding an option is necessary because having an event is more than enough - it is possible to abandon the PR. The more important in that case is what should happen when the clear button is clicked - either to open the drop-down or not, something that is different between igx-combo and igx-simple-combo and should be consistent.

Soon there will be an effort for a combo component in our web-components package, so we will discuss the best UX for the clear button and will transform the solution here. I hope till then you can use the solution @RivaIvanova has suggested you.

Lipata avatar Nov 10 '22 17:11 Lipata

There has been no recent activity and this issue has been marked inactive.

github-actions[bot] avatar Jan 10 '23 00:01 github-actions[bot]

There has been no recent activity and this issue has been marked inactive.

github-actions[bot] avatar Mar 12 '23 00:03 github-actions[bot]

@Lipata , @teodosiah do you have update on that issue?

radomirchev avatar Mar 13 '23 08:03 radomirchev

The combo in the web-components was designed so that the clear button never opens the drop-down - this is for both multiple selection and single selection mode (in web-components it is one component). Once the value is cleared then one additional click will open the drop-down. I think this is a good solution and it was agreed by our design team that this is a good approach.

It seems that we can change the simple combo in angular to behave the same way - not to open the drop-down on clear, and if somebody wants such a thing we will provide him with an application solution. @kdinev do you think that we can introduce such a behavioral change for the simple-combo and in that way sync it with the combo in angular and combo in web components?

Lipata avatar Mar 14 '23 13:03 Lipata

Seems like currently the igx-simple-combo and igx-combo have an inconsistent behavior. Does the specification explicitly state that the drop down opens on clear with the simple combo? If yes, then it's an expected behavior, if not, then it should be consistent with the igx-combo component.

kdinev avatar Mar 15 '23 14:03 kdinev

The igx-simple-combo specification in angular doesn't state that drop down opens on clear, so we will proceed with changing that behavior in the igx-simple-combo and align it with igx-combo and the igc-combo. @teodosiah, @RivaIvanova we can proceed with the implementation and also provide an application scenario that will cover the old behavior in the igx-simple-combo.

Lipata avatar Mar 15 '23 18:03 Lipata