Skip to content

Bug Report: GroupBy not working with SingleSelection #593

Open

Description

@levi-hrb

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!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions