-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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 beta] {{get}} helper subscribes to values and can be updated #11691
Conversation
view = EmberView.create({ | ||
context: context, | ||
container: container, | ||
template: compile('{{input id=\'get-input\' type=\'text\' value=(mut (get source \'banana\'))}}') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you use back ticks instead of single quotes?
`{{input id='get-input' ...}}`
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep will do
ff1ca3e
to
37a39a4
Compare
Any updates here? |
This should be good to go.. @mmun? Just need to document it.. |
I will merge this but I'm a little sad how complicated it has to be right now. Needs a rebase. |
This commit fixes two issues: 1. When using the {{get}} helper it sometimes wouldn't update correctly. Because a helper and a keyword are being used, ember is invoking the helper logic and wrapping the stream the get keyword creates in a BuiltInHelperStream - it also would not subscribe the morph to the stream. This subscription is where the error lies. To fix this the helper has been removed and only keyword logic is implemented. 2. It was previously not possible to use the {{input}} helper with the {{get}} helper - this functionality has now been added using the mut keyword, e.g: {{input value=(mut (get source path)) type='text'}}
37a39a4
to
de5446f
Compare
Rebase done. @mmun is there anything I should do to make it less complicated? |
It would require an HTMLBars refactor. Sauce failed, I'll restart it. |
[BUGFIX beta] {{get}} helper subscribes to values and can be updated
This PR fixes two issues:
1: When using the {{get}} helper it sometimes wouldn't update correctly.
Because a helper and a keyword are being used, Ember is invoking the helper logic and wrapping the stream the get keyword creates in a
BuiltInHelperStream
- it also would not subscribe the morph to the stream. This subscription is where the error lies.To fix this the helper has been removed and only keyword logic is implemented.
2: It was previously not possible to use the
{{input}}
helper with the{{get}}
helperThis functionality has now been added using the mut keyword, e.g:
{{input value=(mut (get source path)) type='text'}}
This should help with making progress on #4619.