-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
[BUGFIX beta] {{get}} helper subscribes to values and can be updated#11691
[BUGFIX beta] {{get}} helper subscribes to values and can be updated#11691mmun merged 1 commit intoemberjs:masterfrom
Conversation
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}} helper
This 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.
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? |
|
I will merge this but I'm a little sad how complicated it has to be right now. Needs a rebase. |
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
|
It would require an HTMLBars refactor. Sauce failed, I'll restart it. |