components icon indicating copy to clipboard operation
components copied to clipboard

md-select not working with object

Open EddyNll opened this issue 9 years ago • 3 comments

Bug, feature request, or proposal:

Im using multiple md-select on a page. Some work and others don't. The ones containing an object don't work. When using a normal select they all work.

Strange behaviour

The id property of md-option and aria-owns property of md-select keeps increasing unlimited. This also makes the option dialog flicker.

Examples

Example of non working md-select

<md-select placeholder="Related definition" [(ngModel)]="field.relatedDefinition" #definition="ngModel">
    <md-option *ngFor="let definition of definitions" [value]="definition._id">
        {{definition.name}}
    </md-option>
</md-select>

Working select

<select [(ngModel)]="field.relatedDefinition" #definition="ngModel">
    <option *ngFor="let definition of definitions" [value]="definition._id">
        {{definition.name}}
    </option>
</select>

EddyNll avatar Feb 09 '17 10:02 EddyNll

@EddyNll Can you add a plunker repro? Objects are working on my end as long as the reference is the same.

kara avatar Feb 09 '17 19:02 kara

@kara My bad, list of Objects got updated because of an observable. Works fine.

EddyNll avatar Feb 10 '17 07:02 EddyNll

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.