date + fix sort

This commit is contained in:
2024-05-21 17:00:56 +02:00
parent 540d4814d9
commit 8bcbf3bd1d
5 changed files with 16 additions and 7 deletions
+1 -1
View File
@@ -25,7 +25,7 @@ export const useSort = <T>(array: MaybeRefOrGetter<T[]>, options?: UseSortOption
headerComponent: options?.headerComponent,
}));
const sortedArray = computed(() => toValue(array).sort((a, b) => {
const sortedArray = computed(() => toValue(array).toSorted((a, b) => {
if (sortKey.value === null || sortDirection.value === null) {
return 0;
}