From 7c9ae56b74f9bc3fe59e0a4ebb62863533129808 Mon Sep 17 00:00:00 2001 From: EngHell Date: Wed, 19 Apr 2023 14:48:12 -0600 Subject: [PATCH] clear event dispatcher now updates before emiting As `select` and `deselect`, do update `modelValue` before emitting their respective events, `clear` now updates before emitting the `clear` event, to make it consistent. --- src/composables/useOptions.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/composables/useOptions.js b/src/composables/useOptions.js index cd70883..f2e2a2f 100644 --- a/src/composables/useOptions.js +++ b/src/composables/useOptions.js @@ -307,8 +307,8 @@ export default function useOptions (props, context, dep) } const clear = () => { - context.emit('clear', $this) update(nullValue.value) + context.emit('clear', $this) } const isSelected = (option) => { @@ -853,4 +853,4 @@ export default function useOptions (props, context, dep) resolveOptions, refreshLabels, } -} \ No newline at end of file +}