fix(name-binding): add extra props to update one time mode #741
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Thanks to
@edwrd01
on Discourse at https://discourse.aurelia.io/t/issue-using-ref-in-a-repeat-for-with-a-value-converter/2328/5 , we uncover an issue related the combination ofref
binding,repeat
andvalue-converter/binding-behavior
. The issue is due torepeat
custom attribute unable to update ref binding, in case of a mutation in source collection, piped through value converter / binding behavior. i.e:As it uses this https://github.com/aurelia/templating-resources/blob/0896552d553af0d69399b9b227317a26bdc14005/src/repeat-utilities.js#L109-L115 under the hood to update the bindings that do not employ observation,
NameBinder
is one of those binding types. There are two ways to fix it:updateOneTimeBindings
to reassign targetoneTime
, and add methodcall
to reassign targetI went with (2) since it seems to align better with other bindings, also the location of this class (binding module).
cc @EisenbergEffect @fkleuver