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

Push values to be selected #407

Open
jpveldtman opened this issue Aug 30, 2023 · 1 comment
Open

Push values to be selected #407

jpveldtman opened this issue Aug 30, 2023 · 1 comment

Comments

@jpveldtman
Copy link

Angular version:
16

ng-multiselect-dropdown version:
1.0.0

Description of issue:
Unable to populate data that was previously selected

Steps to reproduce:
Create an ng-multi-select , on the click of the test button, the first object should be pushed from the data to the model and it should appear as if selected

Expected result:
First Option is selected (Just for testing purpose)

Actual result:
Option is part of the model but the UI does not select the item

Demo: Please share sample code link using StackBlitz or codesandbox
https://stackblitz.com/edit/stackblitz-starters-k8pydo?file=src%2Fmain.ts

@RyanDurkin
Copy link

Looks like you need to keep track of the selected items in another variable and then replace the whole list e.g.

this.selCountries = this.options;

Ref: #68

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

2 participants