-
Notifications
You must be signed in to change notification settings - Fork 6.8k
fix(selection-model): inaccurate selected value when accessed in change subscription #8599
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(selection-model): inaccurate selected value when accessed in change subscription #8599
Conversation
…ge subscription Fixes the `selected` value being out of date in the `SelectionModel`, if it is accessed inside an `onChange` subscription. Fixes angular#8584.
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
Any chance of ever add
I realize it's a change event, but as a convenience it would be very handy. Edit: I see now why that would be inefficient. The _selected array isn't up to date when the change event is emitted so you wouldn't want to run through the whole array just to raise the change event. |
@simeyla the intention with the |
Exposes the selection model that dispatched an event inside the event itself. This is mostly for convenience, because it allows the consumer to access the selected value and other properties without having to reach outside the callback. Relates to the discussion in angular#8599.
Exposes the selection model that dispatched an event inside the event itself. This is mostly for convenience, because it allows the consumer to access the selected value and other properties without having to reach outside the callback. Relates to the discussion in angular#8599.
Exposes the selection model that dispatched an event inside the event itself. This is mostly for convenience, because it allows the consumer to access the selected value and other properties without having to reach outside the callback. Relates to the discussion in #8599.
Exposes the selection model that dispatched an event inside the event itself. This is mostly for convenience, because it allows the consumer to access the selected value and other properties without having to reach outside the callback. Relates to the discussion in #8599.
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. |
Fixes the
selected
value being out of date in theSelectionModel
, if it is accessed inside anonChange
subscription.Fixes #8584.