Hi,
In the example of combo component(https://stackblitz.com/angular/mjvpnollgae) a single selection example is created with a combination of a input-group and a drop-down but the component is not responsive and has not filtering features.
Can the combo component be configured to allow only single selection?
My tests are with igniteui-angular 6.1.2
Hi, Michael.
Those are things that can be achieved on an application level, and I can prepare a demo for you. I will just need some more details about your case. What you are expecting when blurring the drop down with text in the input that is not presented in the list? To clear the input and close the drop down? To leave the text, as it is (eventually select it) and don't close the drop down?
When you are in the input the arrow down will open the drop down and Esc button will close it. Do you want when you are on the first item and press Arrow Up to close the drop down?
If you still expect that to be out of the box, presented from some of our components we can proceed with logging and feature requests. Lets clear what your expectations are and if you prefer I can log the bug in our public repository. Thank you once again for the cooperation!
Best regards,
Nikolay Alipiev
Software developer
Hi Nikolay,
the click handler works but in comparison to a "real" DropDown there is no up/down arrow. I tried to add this using other samples (https://stackblitz.com/angular/yrenqrvxgak) but failed to do so.
But it is more problematic that using the above mentioned sample the filter string is set as townSelected if no item is selected from the dropdown.
autocomplete-open-on-click-cm8eva.stackblitz.io
Click on "Town", type "er", click on the background"er" is set as townSelected
Not usable.
This can be easily achieved, by adding a click handler to the input and inside manually opening the drop down. Here is a demo, which extends the first demo from the autocomplete topic, with the handler that opens the drop down. I will wait for your feedback if that scenario fits your needs.
As you can see this is an application scenario. When designing components, we always consider such scenarios as something that could be integrated into the component or is something that can be configured in the application. We think that adding a click handler, in that case, is straightforward and in some cases, it is better to do it in the application, instead of creating an additional component setting that may complicate component logic. However, if you think that this should be in the igx-autocomplete you can create a feature request (new issue) in our public repository.
Thank you for your cooperation!
Software Developer
thanks for your suggestion.
Looks good execpt for "The suggestions will show once you start typing in the text input or use the Arrow Up/Arrow Down keys." In our case the list must be shown immediately like in dropdown or combo.
Virtual Drop Down will not be needed as the number of items will not increase significantly.
I think the easiest way would still be a single select ComboComponent or a filter on DropDown.
Thank you for your patience!.
Since my last answer, we have introduced igx-autocomplete as a component, which is using igx-drop-down as a source and is filtering its items. Can you check if this is what you are expecting?
I hope that the above component should be enough in your case. However, I want to share with you that in addition, we have introduced Virtual Drop Down, whose goal is to render only the visible items, in order to gain performance. Both with igx-autocomplete can be combined in cases when drop-down data is large. In your specific case having 600-700 items will not differ for the autocomplete, especially knowing that after filtering the list will be reduced. I just want to ensure you that if your data grows the performance will not change.
I will wait for your feedback. Please don't hesitate if you have more questions or need a specific demo for your case. We will be very happy to work with you for the future! Thank you!