[docs] Fix statement about the order of bind: and on: (#7357)

* Fix statement about order of bind: and on:

* It's just an example

* Revert and modify

* Update site/content/docs/02-template-syntax.md

Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>

* Update site/content/docs/02-template-syntax.md

Co-authored-by: Tan Li Hau <tanhauhau@users.noreply.github.com>
Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>
pull/7738/head
gtmnayan 4 years ago committed by GitHub
parent 19451c0275
commit 488edb00ad

@ -627,7 +627,7 @@ On `<input>` elements with `type="file"`, you can use `bind:files` to get the [`
---
`bind:` can be used together with `on:` directives. The order that they are defined in determines the value of the bound variable when the event handler is called.
If you're using `bind:` directives together with `on:` directives, the order that they're defined in affects the value of the bound variable when the event handler is called.
```sv
<script>
@ -641,6 +641,7 @@ On `<input>` elements with `type="file"`, you can use `bind:files` to get the [`
/>
```
Here we were binding to the value of a text input, which uses the `input` event. Bindings on other elements may use different events such as `change`.
##### Binding `<select>` value

Loading…
Cancel
Save