Skip to content
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

[BUGFIX] Fix reactivity of dynamic attributes #1272

Merged
merged 1 commit into from
Feb 16, 2021

Conversation

pzuraq
Copy link
Member

@pzuraq pzuraq commented Feb 16, 2021

The updates to use autotracking through the VM resulted in a bug in
dynamic attributes. Previously, the updating opcode for dynamic
attributes would run its update function based on tags/autotracking -
whenever any tag updated (e.g. a tracked value was changed) the
attribute would call its update function. The update function would
then check the new value against the current value of the attribute, and
update if they were different.

The bug was we introduced a value comparison in the updating opcode
itself, based on the last value of the property to set the attribute to.
This meant that if the property was updated to the same value twice in
a row, it would not call update, even if the attribute's value had
changed (e.g. because the user typed something).

The updates to use autotracking through the VM resulted in a bug in
dynamic attributes. Previously, the updating opcode for dynamic
attributes would run its update function based on tags/autotracking -
whenever any tag updated (e.g. a tracked value was changed) the
attribute would call its `update` function. The `update` function would
then check the new value against the current value of the attribute, and
update if they were different.

The bug was we introduced a value comparison in the updating opcode
itself, based on the last value of the property to set the attribute to.
This meant that if the property was updated to the same value twice in
a row, it would not call `update`, even if the attribute's value had
changed (e.g. because the user typed something).
@rwjblue rwjblue added the bug label Feb 16, 2021
@rwjblue
Copy link
Member

rwjblue commented Feb 16, 2021

FYI - This is a backport of #1268 into the branch used by [email protected].

@rwjblue rwjblue merged commit 5f66198 into release-0-65 Feb 16, 2021
@rwjblue rwjblue deleted the backport-fix-attribute-updating branch February 16, 2021 23:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants