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

Cannot ref: a <:Component inside an {{#if #1203

Closed
aphitiel opened this issue Mar 5, 2018 · 1 comment
Closed

Cannot ref: a <:Component inside an {{#if #1203

aphitiel opened this issue Mar 5, 2018 · 1 comment
Labels

Comments

@aphitiel
Copy link
Contributor

aphitiel commented Mar 5, 2018

Tried to add a ref: to a <:Component that is conditionally shown - here's a REPL.

The interesting bit is

{{#if true}}
  <:Component {dyn} ref:dyn text="{{hasDyn}}"/>
{{/if}}

The button logs this.refs, an empty object.
If you change the first line to {{#if true}} or initialise hasDyn to true, it logs {dyn: Nested}.
Works as expected with normal components.

Intrestingly, if you remove the text="{{hasDyn}}" part, you have to remove the whole {{#if to make it work.
Happens at 1.55.1 as well.

I think I can find a workaround, just thought I'd leave this here.

@Conduitry
Copy link
Member

Looks like this was another instance of what was fixed in #1280, so this should be good in 1.58.3.

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

No branches or pull requests

3 participants