Yeah, I have those defined. I’ll tidy and push to a repo.
A test demonstrating a form of two way binding with an embedded Component would be extremely helpful!
Yeah, I have those defined. I’ll tidy and push to a repo.
A test demonstrating a form of two way binding with an embedded Component would be extremely helpful!
I was able to access that, and the scheduleRerender()
function. Updated tests and docs in
Just confirming - your @bind
is imported from discourse-common/utils/decorators
?
Confirmed
Here’s the repo: GitHub - paviliondev/layouts-tag-intersection-widget: A small widget to allow you to navigate to a topic list based on a combinations of tags
And the widget file specifically: layouts-tag-intersection-widget/layouts-tag-combo.js.es6 at master · paviliondev/layouts-tag-intersection-widget (github.com)
Very much WIP and non-working as stated.
(Requires Layouts plugin installed and configured to test as is, but trivial to extract the widget code)
Ah, I think this might help:
- @onChange={{action @data.onChangeUpdateTagSet}}/>
+ @onChange=@data.onChangeUpdateTagSet/>
When passing a ‘closure action’, there is no need for the (action
helper (and in this case, I guess it actually breaks things)
That appears to result in TypeError: this.attrs.onChange is not a function
?
But yeah, maybe that helper is masking the available attributes?
Oh my bad, we need some curlys there, otherwise it’s just parsed as a string attribute.
- @onChange={{action @data.onChangeUpdateTagSet}}/>
+ @onChange={{@data.onChangeUpdateTagSet}} />
Unfortunately that results in the same error?
Can you add a breakpoint and find out what the value of this.attrs.onChange
is? (The “pause in exception” feature in the dev tools may help here)
@David and I have resolved this over PM:
Thanks so much for your time @David.
I’ll publish the TC once complete.
This is now a thing, albeit slightly roughly finished atm:
Requires the Layouts Plugin.
Repo of Theme Component here: GitHub - paviliondev/layouts-tag-intersection-widget: A small widget to allow you to navigate to a topic list based on a combinations of tags
FYI this component supports Right Sidebar Blocks now too!
FYI This component supports Discourse Bars 🍻 🍸