0
votes

I am trying to pre-select some list options in an mat-selection-list. In my real app the selection options are filled by querying a backend service (async) and the options I want wo select are defined in a query string (so they are known before the options "arrive"). The only way to make it work is by parsing the querystring after the options are there (actually I even need to add a delay to the parsing to make it more reliable).

I tried to use the selection list as is and in a reactive form, which doesn't seem to make a difference. I narrowed down the problem to this example code, which doesn't even load the options asynchronously: https://angular-material2-issue-ga97pt.stackblitz.io

The second option should be pre-selected or am I getting something wrong here?

Hello to StackOverflow, could you provide us your code ? What you already triedNikolai Kiefer
Well the real code, doesn't make sense without the backend service. Thats why I created the stackblitz example, which reproduces the problem with the least amount of code.Tobias Bräutigam