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 Nikolay,
Is there a way to make igx-combo to display its items in drop-up mode instead of drop-down ?
Hi Michael (& Eduardo),
I have the same issue, and I think I may have a solution.
https://stackblitz.com/edit/github-cxvmpg?devtoolsheight=33&file=src/app/combo-main/combo-main.component.ts
The key to shoe-horning this component into single-select mode is to change the newSelection array in the onSelectionChange event:
public handleSelection(e) { console.log('Before ' + e.newSelection); if (e.newSelection.length > 1) { e.newSelection = e.added; } console.log('After ' + e.newSelection); }
I am still testing this approach.
In my example, I have also enhanced the list of states so that each state has a numeric key. I frequently need the key bound to my data model, yet I want to display the description.
After some testing, if this works for me I plan to wrap the igx-combo in my own component so that I can pass a parameter to control whether I want single-select or multi-select.
I agree that single-select should have been a property of the igx-combo, because it is a such a common development choice.
Walter
Michael,
I have the same need - and I am experimenting with the solution below.
I wonder if it will work for you too.
1) add onSelectionChange to the combo in your html
Hi, Michael.
I understand. Whatever you decide, please log this as a feature request in our public repository. Our product owners are reviewing the feature requests and are prioritizing them. We also has an UX team that using your requirements will evaluate the different behaviors and API of the component. What you are requesting is valid scenario and I'm sure we will carefully evaluate the need for such a component.
Google with Angular and Material Design Guidelines are proposing a different philosophy for creating applications. Ignite UI for Angular are native components and using them requires different approach as opposed to our Ignite UI for JavaScript components for example. However we understand that it is important for developers to switch between technologies as fast as possible.
Best regards,
Nikolay Alipiev
Software Developer
thanks for your help.
Just look at the existing Combo and take away the checkboxes and multiselect. That's it.If filtering results in "nothing found" the list should be empty.
But please do not spend any more time on this. The "single select combo" was just the first component we tried to replace in our app to see how it fits into our code.
We have to look more into it before we can decide if we really can or want to switch. The Ingnite UI components have a different philosophy than we are used to so we would have to change a lot in our code.
ThanksMichael