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

Components in each-blocks with two-way binding don't always update #356

Closed
Rich-Harris opened this issue Mar 8, 2017 · 0 comments · Fixed by #357
Closed

Components in each-blocks with two-way binding don't always update #356

Rich-Harris opened this issue Mar 8, 2017 · 0 comments · Fixed by #357
Assignees
Labels

Comments

@Rich-Harris
Copy link
Member

This works...

{{#each a as b}}
	<Widget value='{{b}}'/>
{{/each}}

...but this doesn't:

{{#each a as b}}
	<Widget bind:value='b'/>
{{/each}}

Reason is the discrepancy between this code and this code — in the first case Svelte is checking if the dependencies of b (i.e. ['a']) are among the changed data properties, in the second case it's checking if b itself is among them (which of course it isn't).

@Rich-Harris Rich-Harris added the bug label Mar 8, 2017
@Rich-Harris Rich-Harris self-assigned this Mar 8, 2017
Rich-Harris added a commit that referenced this issue Mar 8, 2017
fix two-way binding for components inside each-blocks
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.

1 participant