-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[BUGFIX release] Correctly links ArrayProxy tags to
arrangedContent
Currently, if `arrangedContent` is overridden in an ArrayProxy with a computed property that depends on changes to another array/context, those changes will not propagate correctly. This is because we never link the tags of the ArrayProxy to the corresponding tags of the `arrangedContent`, instead relying on array observers to propagate changes. This works when the underlying array is being changed directly, but _doesn't_ work if the array is being replaced entirely (e.g. the computed property has invalidated and needs to recompute). This PR ensures that ArrayProxy tags are setup correctly, so that if `arrangedContent` ever changes, the proxy will also propagate those changes. This will affect anything that depends on the ArrayProxy directly, such as `{{#each}}` loops and other computed properties. One side effect of this is that ArrayProxy's no longer need to manually dirty themselves, and in fact attempting to do so can trigger the backtracking rerender assertion (specifically when the proxy first attempts to update/synchronize while rendering). Internally, a boolean flag has been added to the array change methods to allow it to opt-out of sending a notification.
- Loading branch information
Showing
3 changed files
with
48 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters