From 8714980595e0cfa62e24b7a38f0553ad5c2290fa Mon Sep 17 00:00:00 2001 From: alexm Date: Tue, 19 Nov 2024 14:28:43 +0100 Subject: [PATCH] fix(VnSelect): setOptions when applyFilter --- src/components/common/VnSelect.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/common/VnSelect.vue b/src/components/common/VnSelect.vue index 227ff9465..f24f054a5 100644 --- a/src/components/common/VnSelect.vue +++ b/src/components/common/VnSelect.vue @@ -202,7 +202,10 @@ async function fetchFilter(val) { if (fields) fetchOptions.fields = fields; if (sortBy) fetchOptions.order = sortBy; arrayData.reset(['skip', 'filter.skip', 'page']); - return (await arrayData.applyFilter({ filter: fetchOptions }))?.data; + + const { data } = await arrayData.applyFilter({ filter: fetchOptions }); + setOptions(data); + return data; } async function filterHandler(val, update) {