Skip to content
This repository was archived by the owner on Jan 6, 2025. It is now read-only.

fix(core): reset current value when directive is cleared #1376

Merged
merged 1 commit into from
Dec 23, 2021

Conversation

CaerusKaru
Copy link
Member

@CaerusKaru CaerusKaru commented Dec 23, 2021

When a directive is fired, it sets a current value to compare to
future values, that way we don't fire mutiple costly element
change events per media update. However, when a directive moves
to an "uncovered" segment, ie a segment where there is no active
value, we are not clearing the previous current value. This leads
to a lack of updates when styles are not present but should be,
e.g. when a directive moves into an uncovered segment, and then
back into a covered one.

Therefore, we reset the currentValue for a directive when we clear
styles, to enable updates when moving back to a covered segment
later.

Fixes #1291

When a directive is fired, it sets a current value to compare to
future values, that way we don't fire mutiple costly element
change events per media update. However, when a directive moves
to an "uncovered" segment, ie a segment where there is no active
value, we are not clearing the previous current value. This leads
to a lack of updates when styles are not present but should be,
e.g. when a directive moves into an uncovered segment, and then
back into a covered one.

Therefore, we reset the currentValue for a directive when we clear
styles, to enable updates when moving back to a covered segment
later.
@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Jan 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fxFlexOrder.gt-md only applies first time
1 participant