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

Component data not updated when firing an event as a result of an event fired in a nested component. #1353

Closed
heardy opened this issue Apr 19, 2018 · 2 comments · Fixed by #1366
Labels

Comments

@heardy
Copy link

heardy commented Apr 19, 2018

I have come across an issue when firing a custom event which is triggered as a result of an event fired in a nested component.

If you fire the custom event within the components directive, the data seems to be from the initial state of the container component. The value is changed within the nested component though.

If you use an event handler in the directive and fire the custom event from within the handler then the container components data is correct.

REPL example for a better explanation so ^ makes sense - https://svelte.technology/repl?version=1.64.0&gist=60bdf43e8b114186d23cd85893295748

@TehShrike
Copy link
Member

Looks like the issue was added in 1.56.0: https://svelte.technology/repl?version=1.55.1&gist=60bdf43e8b114186d23cd85893295748

@Rich-Harris
Copy link
Member

this is fixed in 2.1.1 — thanks

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

Successfully merging a pull request may close this issue.

4 participants