IgniteUI / igniteui-angular

Ignite UI for Angular is a complete library of Angular-native, Material-based Angular UI components with the fastest grids and charts, Pivot Grid, Dock Manager, Hierarchical Grid, and more.
https://www.infragistics.com/products/ignite-ui-angular
Other
569 stars 162 forks source link

igx-simple-combo: Input field does not display value when clearing is canceled in selectionChanging event #14310

Closed georgianastasov closed 3 months ago

georgianastasov commented 4 months ago

Description

When using the igx-simple-combo component with a selectionChanging handler, if the selection is cleared and the event is canceled to prevent clearing, the value remains internally but is not displayed in the input field.

Steps to reproduce

  1. Initialize the igx-simple-combo component with a list of cities and set an initial selection.
  2. Add a selectionChanging event handler that cancels the event if event.newSelection is undefined (i.e., when attempting to clear the selection).
  3. Run the application.
  4. Attempt to clear the selection in the combo box.

Result

The combo box is not cleared, but the input field becomes empty, and the selected value is not displayed.

Expected result

The combo box should not be cleared, and the input field should display the current selected value as text when the selection is cleared and the event is canceled.

Attachments

A sample project is attached that demonstrates the issue. The issue can be observed when attempting to clear the selection.

Link to the sample: StackBlitz Sample

1