From 2276a49fbc2fc1d790bd23989e3ebdbcbdc99bfd Mon Sep 17 00:00:00 2001 From: Daniel Imfeld Date: Thu, 14 May 2020 07:15:01 +0000 Subject: [PATCH] docs: `value` can not be set via spread attribute when using bind:group Fixes #4808 --- site/content/docs/02-template-syntax.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/site/content/docs/02-template-syntax.md b/site/content/docs/02-template-syntax.md index 165dd86106..68ecaca004 100644 --- a/site/content/docs/02-template-syntax.md +++ b/site/content/docs/02-template-syntax.md @@ -677,6 +677,27 @@ Inputs that work together can use `bind:group`. ``` +--- + +The Svelte compiler must be able to detect the `value` attribute for `bind:group` to work properly. + +This example uses spread attributes to set the `value` of each checkbox, but it will *not* work since the compiler can not see the `value` attribute. + +```sv + + +{#each tortillaInputs as props} + +{/each} +``` + #### [bind:this](bind_element) ```sv