I seem to be having trouble using an igx-drop-down in a reactive form. Your sample uses a combo box. Any help will be appreciated.
Thanks,
JK
Thank you for posting in our community!
In general, there are several key points here.
So in order to implement a somewhat similar to the IgxCombo component, it will basically require creating a custom component utilizing an input and IgxDropDown for example plus implementing ControlValueAccessor Interface.
Why is that you wish to use the IgxDropDown instead of the IgxCombo? The second is built upon the first one and provides more functionality and flexibility. Is it because you require a single selection only or else? If you are after simplified combo version with single selection, it could be considered a new feature request. I suggest you to “vote” for implementing such a “Single Select” component. When planning new releases, our Product Management team will look at the most popular features and use your feedback to prioritize upcoming work.
I am looking forward more feedback from you!
Related samples:
Thanks for the quick response. You are correct, I'm looking to a component that I can enforce a single selection. I will vote for this new feature. In the mean time, is there any way I can simulate this single selection in an IgxCombo?
I think I've come up with a work around to limit the user to 1 choice in the igx-combo. I've add some logic in the onClosing event that will check if multiples have been selected and display a dialog box and revert to the original value.
HTML
-------
Hello JK,
Thank you for your feedback! Sharing in the community benefits all users.
I am glad you found a suitable solution. In case you are interested in an alternative, you may consider using a combination of igx-input-group and igx-drop-down to mimic a single selection combo.
You will find such an implementation here: https://stackblitz.com/edit/combo-single-selection-ig. Optionally it should be possible to implement ControlValueAccessor as well, in order to use it in a reactive form.
Thanks for the suggestions. As always, very helpful.