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

Async components does not update fragments when resolved #1784

Closed
xkjyeah opened this issue Nov 10, 2015 · 0 comments
Closed

Async components does not update fragments when resolved #1784

xkjyeah opened this issue Nov 10, 2015 · 0 comments

Comments

@xkjyeah
Copy link

xkjyeah commented Nov 10, 2015

Test case: https://jsfiddle.net/zoqmj7vq/

Description of test case:

  • Clicking on each list item is supposed to delete the item from the model
  • Expected Results: When a <li> item is clicked, the corresponding items should be deleted from both Section A and Section B
  • Actual Results: The items are not deleted from Section A, whose template is loaded asynchronously.
  • Adding items after the template is loaded does not exhibit this problem. This is because the document fragment has been properly created.

Root of problem

this.unlink = linker(vm, frag, host, scope, this)

When asynchronous components are used, frag becomes an empty text element.
When the component is loaded, the newly created elements are created in their correct positions, but the fragment cache is not updated.
Therefore deleting the component using data from the fragment cache fails.

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

1 participant