This repository was archived by the owner on Sep 5, 2024. It is now read-only.
This repository was archived by the owner on Sep 5, 2024. It is now read-only.
select: changing ng-model after render with md-virtual-repeat does not display selected value #11842
Open
Description
it is a normal md-select with options and instead of ng-repeat i have used md-virtual-repeat but the ng-model is not working!
See the codepen for more details - https://codepen.io/lakshmi_suhas/pen/abzKJmq
when trying to select any option it it binding, but assume data is getting from backend and want to bind the default option (see the $timeout call in pen) it is not working at first but when the md-select is opened / clicked the selectedOption is binding.
Please tell me what's wrong in the code or it is material bug.
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
[-]md-select > ng-model is not working with md-virtual-repeat-container (assume data getting from backend)[/-][+]md-select > ng-model is not working with md-virtual-repeat-container (assume data coming from backend)[/+]Splaktar commentedon Feb 1, 2020
I updated the CodePen to 1.1.21 and ran into the options not displaying at all due to #10868.
I see that you are using AngularJS Material 1.0.9 since that is the last version to support
md-virtual-repeat
withmd-select
due to that above issue.Your CodePen gives me the following exception on load:
I fixed it in this CodePen, but it only resolves the exception and not the issue with the select showing the selected value on page load.
[-]md-select > ng-model is not working with md-virtual-repeat-container (assume data coming from backend)[/-][+]select: changing ng-model after render with md-virtual-repeat does not display selected value[/+]