|
|
|
@ -37,6 +37,7 @@ export function useViewSorts(view: Ref<ViewType | undefined>, reloadData?: () =>
|
|
|
|
|
if (isPublic.value || isSharedBase.value) { |
|
|
|
|
sorts.value[i] = sort |
|
|
|
|
sorts.value = [...sorts.value] |
|
|
|
|
reloadHook?.trigger() |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -75,6 +76,7 @@ export function useViewSorts(view: Ref<ViewType | undefined>, reloadData?: () =>
|
|
|
|
|
sorts.value.splice(i, 1) |
|
|
|
|
sorts.value = [...sorts.value] |
|
|
|
|
|
|
|
|
|
reloadHook?.trigger() |
|
|
|
|
$e('a:sort:delete') |
|
|
|
|
} catch (e: any) { |
|
|
|
|
console.error(e) |
|
|
|
@ -82,9 +84,5 @@ export function useViewSorts(view: Ref<ViewType | undefined>, reloadData?: () =>
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
watch(sorts, () => { |
|
|
|
|
reloadHook?.trigger() |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
return { sorts, loadSorts, addSort, deleteSort, saveOrUpdate } |
|
|
|
|
} |
|
|
|
|