You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/events.md
+42-2Lines changed: 42 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,46 @@ title: 'Events'
4
4
5
5
# Events
6
6
7
-
Currently, Vue 3 Select Component doesn't emit any custom events, except for the native `v-model` one.
8
-
9
7
If you have the need for custom events, please open an issue on the [GitHub repository](https://github.com/TotomInc/vue3-select-component) with your use case and we will be happy to investigate it.
8
+
9
+
## `@option-selected`
10
+
11
+
Emitted when an option is selected, in the same tick where the `v-model` is updated.
**Note**: this is emitted on the same tick as the v-model is updated, before a DOM re-render.
24
+
25
+
::: info
26
+
If you want to keep track of the selected option, it is recommended to use a `computed` combined with the `v-model`, instead of this event ([see this issue comment](https://github.com/TotomInc/vue3-select-component/issues/7#issuecomment-2083422621)).
0 commit comments