From 91695ec3c880bf887c8ab77d56f891fdae252318 Mon Sep 17 00:00:00 2001 From: Sabu Siyad Date: Thu, 23 Nov 2023 12:06:02 +0530 Subject: [PATCH] fix: filters: reactivity --- desk/src/components/FilterPopover.vue | 4 ++-- desk/src/components/SearchComplete.vue | 3 +++ desk/src/composables/filter.ts | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/desk/src/components/FilterPopover.vue b/desk/src/components/FilterPopover.vue index 97d29b164..4cad996ad 100644 --- a/desk/src/components/FilterPopover.vue +++ b/desk/src/components/FilterPopover.vue @@ -27,7 +27,7 @@
@@ -67,7 +67,7 @@
diff --git a/desk/src/components/SearchComplete.vue b/desk/src/components/SearchComplete.vue index 169f32c51..5ff22e57e 100644 --- a/desk/src/components/SearchComplete.vue +++ b/desk/src/components/SearchComplete.vue @@ -49,6 +49,9 @@ const r = createListResource({ pageLength: props.pageLength, auto: true, fields: [props.labelField, props.searchField, props.valueField], + filters: { + [props.searchField]: ["like", `%${props.value}%`], + }, onSuccess: () => { selection.value = props.value ? options.value.find((o) => o.value === props.value) diff --git a/desk/src/composables/filter.ts b/desk/src/composables/filter.ts index e322aabc4..7daccb8d4 100644 --- a/desk/src/composables/filter.ts +++ b/desk/src/composables/filter.ts @@ -146,7 +146,7 @@ export function useFilter(doctype: string) { return { add, apply, - fields: fields.data, + fields, getArgs, storage, };