fix: sortby not clearing

This commit is contained in:
Shariq Ansari 2024-02-05 21:29:41 +05:30
parent c3df0d1e41
commit 8cecb738d2

View File

@ -1,5 +1,5 @@
<template>
<NestedPopover v-if="options">
<NestedPopover>
<template #target>
<Button label="Sort" ref="sortButtonRef">
<template #prefix><SortIcon class="h-4" /></template>
@ -131,7 +131,7 @@ onMounted(() => {
const sortValues = computed({
get: () => {
if (!list.value?.data) return new Set()
let allSortValues = list.value?.params?.order_by || list.value.data?.params?.order_by
let allSortValues = list.value?.params?.order_by
if (!allSortValues || !sortOptions.data) return new Set()
if (allSortValues.trim() === 'modified desc') return new Set()
allSortValues = allSortValues.split(', ').map((sortValue) => {