Skip to content
Snippets Groups Projects
Commit 8824422c authored by Hazelnoot's avatar Hazelnoot
Browse files

merge: Add a clear filter option to the search widget if set (!722)

View MR for information: TransFem-org/Sharkey!722



Closes #786

Approved-by: default avatardakkar <dakkar@thenautilus.net>
Approved-by: default avatarHazelnoot <acomputerdog@gmail.com>
parents bcc845cd c8357a41
No related branches found
No related tags found
No related merge requests found
......@@ -72,7 +72,7 @@ function options(ev) {
{
type: 'button',
icon: 'ph-image ph-bold ph-lg',
text: 'With Images',
text: `With Images ${filetype.value === 'image' ? '' : ''}`,
action: () => {
filetype.value = 'image';
},
......@@ -80,7 +80,7 @@ function options(ev) {
{
type: 'button',
icon: 'ph-music-notes-simple ph-bold ph-lg',
text: 'With Audios',
text: `With Audios ${filetype.value === 'audio' ? '' : ''}`,
action: () => {
filetype.value = 'audio';
},
......@@ -88,12 +88,19 @@ function options(ev) {
{
type: 'button',
icon: 'ph-video ph-bold ph-lg',
text: 'With Videos',
text: `With Videos ${filetype.value === 'video' ? '' : ''}`,
action: () => {
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() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment