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

[components] Fix setting attributes into scoped model on component init #438

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cray0000
Copy link
Member

Related to #418
There are couple of cases when attribute's original path can not be resolved (when attribute is ParentWrapper):

  1. When passing the same attribute from one component into another, like described in attributeContext issue, parameters wrapped in ParentWrapper #418.
  2. When having some complicated argument's value, like
    <view name='payment' payload='{{ { price: 500, params: #root._page.paymentParams } }}'>

currently those kind of attributes end up being ParentWrappers inside component's model

While there is probably a solution to the 1st case, I don't think there is a simple solution to the 2nd one (it can be implemented in theory though - by automatically creating a reactive functions for this kind of argument values or something like that).
So when ParentWrapper attribute fails to resolve it's original path for creating a ref we should at least init component's model with its renderValue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant