Unable to get value from dropdown
sharathdaniel opened this issue · 2 comments
If the dropdown appears in the page on condition (using *ngIf), I'm not able to get the value of the dropdown.
Example link: https://stackblitz.com/edit/angular-8dgnfy-qvvzx8?file=app.component.html,app.component.ts
For dynamic rendering with ngIf in Angular and ensure proper access to values and text from the instance, set static to false in @ViewChild. Below is a sample and code snippet for your reference:
@ViewChild("local", { static: false }) public mulObj: MultiSelectComponent; --
Sample: https://stackblitz.com/edit/angular-8dgnfy-bck1cn?file=app.component.html,app.component.ts
We are closing this issue as part of our routine maintenance due to no activity on it for over a week. If the previously shared solution doesn't resolve the problem or if you have additional information to assist us, please feel free to reopen the issue. Thank you for your understanding.