[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/7562/head
gtmnayan 2 years ago committed by GitHub
parent 8b828a4301
commit 5242ab9a72
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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