diff --git a/site/content/docs/02-template-syntax.md b/site/content/docs/02-template-syntax.md index 68ecaca004..82d98b4462 100644 --- a/site/content/docs/02-template-syntax.md +++ b/site/content/docs/02-template-syntax.md @@ -121,6 +121,9 @@ An element or component can have multiple spread attributes, interspersed with r ``` + +> The `value` attribute of an `input` element or its children `option` elements must not be set with spread attributes when using `bind:group` or `bind:checked`. Svelte needs to see the element's `value` directly in the markup in this case so that it can link it to the bound variable. + --- ### Text expressions @@ -677,27 +680,6 @@ 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