From 131fab103206cae3fb42fe9a4fcf598d166f668d Mon Sep 17 00:00:00 2001 From: Marie Date: Fri, 1 Nov 2024 13:08:28 +0000 Subject: [PATCH] upd: add clear filter option if filter is set --- packages/frontend/src/widgets/WidgetSearch.vue | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/frontend/src/widgets/WidgetSearch.vue b/packages/frontend/src/widgets/WidgetSearch.vue index 9a0752c7f9..8899741821 100644 --- a/packages/frontend/src/widgets/WidgetSearch.vue +++ b/packages/frontend/src/widgets/WidgetSearch.vue @@ -93,7 +93,14 @@ function options(ev) { filetype.value = 'video'; }, }], - }], ev.currentTarget ?? ev.target); + }, + ...(filetype.value ? [{ + text: 'Clear Filter', + icon: 'ti ti-trash', + action: () => { + filetype.value = null; + }, + }] : [])], ev.currentTarget ?? ev.target); } async function search() {