Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug Report: GroupBy not working with SingleSelection #593

Open
levi-hrb opened this issue Nov 30, 2021 · 0 comments
Open

Bug Report: GroupBy not working with SingleSelection #593

levi-hrb opened this issue Nov 30, 2021 · 0 comments

Comments

@levi-hrb
Copy link

levi-hrb commented Nov 30, 2021

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant