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

Q: when count eq zero #10

Open
basz opened this issue Jul 3, 2020 · 1 comment
Open

Q: when count eq zero #10

basz opened this issue Jul 3, 2020 · 1 comment

Comments

@basz
Copy link

basz commented Jul 3, 2020

Would it be safe to wrap the render in a conditional so it won't output when nothing is added?

https://github.com/kaliber5/ember-stargate/blob/master/addon/components/portal-target.hbs

{{#if this.count}}

<div
  {{did-insert this.register}}
  {{will-destroy this.unregister}}
  ...attributes
>
  {{yield this.count}}
</div>

{{/if}
@simonihmig
Copy link
Owner

Hm, I don't think this would work right now, as rendering into the portal target using in-element happens before the portal is registered (so count is still 0). See https://github.com/kaliber5/ember-stargate/blob/master/addon/components/portal.js#L11

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

No branches or pull requests

2 participants