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

Event handlers not deconflicted when one is binding inside each loop and one outside #1919

Closed
Conduitry opened this issue Dec 28, 2018 · 0 comments · Fixed by #1923
Closed
Labels
Milestone

Comments

@Conduitry
Copy link
Member

<input bind:value={foo}>

{#each [] as bar}
	<input bind:value={bar}>
{/each}

results in code that look like

	function input_input_handler() {
		foo = this.value;
		$$invalidate('foo', foo);
	}

	function input_input_handler({ bar, each_value, bar_index }) {
		each_value[bar_index] = this.value;
	}

(Aside: I can't believe this isn't a syntax error, and that I had to find this out by my app not working. Thanks, javascript.)

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