angular2-multiselect-dropdown
angular2-multiselect-dropdown copied to clipboard
Bug Report: GroupBy not working with SingleSelection
If the groupBy setting is enabled the dropdown only works in multiselect mode, when I switch to single selection the console throws an error. But if the selectedItems ngModel is not empty on init it also works with the single selection mode. I made a stack blitz project to reproduce the error:
https://stackblitz.com/edit/angular2-multiselect-dropdown-9j9yrs?devtoolsheight=33&file=src/app/app.component.html
The project contains four dropdowns,
- the first one is a multiselect and groupBy dropdown,
- the second one a single select and groupBy dropdown but with initially selected data
- the third one, a single select and groupBy dropdown but without any initially selected data
- and the last one is a single select and groupBy dropdown, but with an empty array as initially selected data.
Only the first two dropdowns are working. The third one shows no available data, and the fourth one doesn't work at all.
The fourth dropdown throws the following error: Error: item is undefined
I would appreciate it if you can fix this bug, thank you!