ibm-select doesn't follow ngModel
See original GitHub issue<ibm-select [(ngModel)]=“selected”> doesn’t update the selected option
Detailed description
Describe in detail the issue you’re having.
Using ngModel to initialise selected option for ibm-select doesn’t update the component. I see the issue has been reported previously and marked as resolved for example, https://github.com/IBM/carbon-components-angular/issues/1536
Is this a feature request (new component, new icon), a bug, or a general issue? Bug
Is this issue related to a specific component? ibm-select
What did you expect to happen? What happened instead? What would you like to see changed? change selected option programatically
What browser are you working in? latest Chrome/Safari
What version of the Carbon Design System are you using? “carbon-components”: “^10.31.0”, “carbon-components-angular”: “^4.46.0”,
Steps to reproduce the issue
<div style="width: 165px;">
<ibm-select [(ngModel)]="selected">
<option value="option1">Option 1</option>
<option value="option2">Option 2</option>
<option value="option3">Option 3</option>
</ibm-select>
<br />
<span>Selected: {{ selected }}</span>
</div>
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
select ngmodel not binding the variable - Stack Overflow
I think you're missing the use of the ngValue directive here to have the object reflected in the value bound to ngModel ....
Read more >default is not selected · Issue #1798 · carbon-design ... - GitHub
I use Select component with reactive form. The form contains default value of select. ... ibm-select doesn't follow ngModel #1776.
Read more >Two-Way Data Binding in Angular with ngModel - Infragistics
Learn how two-way data binding in Angular is used to display information to the end user and allows them to make changes to...
Read more >ngOptions - AngularJS: API
By default, ngModel watches the model by reference, not value. This is important to know when binding the select to a model that...
Read more >IBM Security AppScan Standard: User Guide
Select Uninstall IBM Security AppScan Standard and follow the instructions. ... Actions to be skipped are identified based on the Id, name or...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@kuroyuki @maksym-plotnikov sorry for the delay and thank you for creating the sandbox, it seems like
@ViewChild
was not getting the right reference in a production build for the select element. I’ll open a PR soon to fix this.@Donisius much appreciated for a quick turnaround!