-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
fix(select): handle async changes to the option label #9159
fix(select): handle async changes to the option label #9159
Conversation
src/lib/core/option/option.ts
Outdated
private _selected = false; | ||
private _active = false; | ||
private _disabled = false; | ||
private _id = `mat-option-${_uniqueIdCounter++}`; | ||
private _oldViewValue = ''; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_mostRecentViewValue
?
src/lib/select/select.ts
Outdated
} | ||
}); | ||
|
||
merge(...this.options.map(option => option._stateChanges)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a comment here that explains what this is for?
8e9cc0e
to
d35278b
Compare
Addressed the feedback @jelbourn. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@crisbeto passes presubmit, just needs rebase |
Currently `mat-select` doesn't react to changes in the label of its options, which is problematic, because the option label might be populated at a later point by a pipe or it might have changed while the select is closed. These changes add a `Subject` to the `MatOption` that will emit whenever the label changes and allows the select to react accordingly. Fixes angular#7923.
d35278b
to
c46cd33
Compare
Rebased. |
Currently `mat-select` doesn't react to changes in the label of its options, which is problematic, because the option label might be populated at a later point by a pipe or it might have changed while the select is closed. These changes add a `Subject` to the `MatOption` that will emit whenever the label changes and allows the select to react accordingly. Fixes angular#7923.
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Currently
mat-select
doesn't react to changes in the label of its options, which is problematic, because the option label might be populated at a later point by a pipe or it might have changed while the select is closed. These changes add aSubject
to theMatOption
that will emit whenever the label changes and allows the select to react accordingly.Fixes #7923.