fix: changed filter/sort not rendering

This commit is contained in:
Shariq Ansari 2024-02-05 17:59:51 +05:30
parent cd697de6e1
commit c9439d1182
2 changed files with 2 additions and 2 deletions

View File

@ -150,7 +150,7 @@ onMounted(() => {
const filters = computed(() => {
if (!list.value?.data) return new Set()
let allFilters = list.value.data?.params?.filters
let allFilters = list.value?.params?.filters || list.value.data?.params?.filters
if (!allFilters || !filterableFields.data) return new Set()
// remove default filters
if (props.default_filters) {

View File

@ -131,7 +131,7 @@ onMounted(() => {
const sortValues = computed({
get: () => {
if (!list.value?.data) return new Set()
let allSortValues = list.value.data?.params?.order_by
let allSortValues = list.value?.params?.order_by || list.value.data?.params?.order_by
if (!allSortValues || !sortOptions.data) return new Set()
if (allSortValues.trim() === 'modified desc') return new Set()
allSortValues = allSortValues.split(', ').map((sortValue) => {