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

willDestroyElement not firing in {{each}} else #12716

Closed
amk221 opened this issue Dec 15, 2015 · 1 comment · May be fixed by tildeio/htmlbars#442
Closed

willDestroyElement not firing in {{each}} else #12716

amk221 opened this issue Dec 15, 2015 · 1 comment · May be fixed by tildeio/htmlbars#442

Comments

@amk221
Copy link
Contributor

amk221 commented Dec 15, 2015

A.                            |     B.
{{#each items as |item|}}     |     {{#each items as |item|}}
  {{!...}}                    |        {{!...}}
{{else}}                      |     {{/each}}
  {{my-component}}            |     {{#unless items.length}}
{{/each}}                     |       {{my-component}}
                              |     {{/unless}}

In example A. the willDestroyElement hook is not firing for {{my-component}} when it is torn down.
It works for example B.
jsfiddle

Saranya-Raaj pushed a commit to Saranya-Raaj/htmlbars that referenced this issue Jan 4, 2016
Saranya-Raaj pushed a commit to Saranya-Raaj/htmlbars that referenced this issue Feb 5, 2016
Saranya-Raaj pushed a commit to Saranya-Raaj/htmlbars that referenced this issue Feb 5, 2016
Saranya-Raaj pushed a commit to Saranya-Raaj/htmlbars that referenced this issue Feb 5, 2016
@amk221
Copy link
Contributor Author

amk221 commented Jul 1, 2016

Thank you everyone!

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

Successfully merging a pull request may close this issue.

4 participants