Skip to content

Commit 5c6ba76

Browse files
authored
Merge pull request #130 from connorabbas/develop
Composable sorting fix
2 parents 5902ff3 + 49290f8 commit 5c6ba76

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

resources/js/Composables/useLazyDataTable.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export function useLazyDataTable(
6060

6161
function sort(event: DataTableSortEvent) {
6262
pagination.value.page = 1;
63-
sorting.value.field = String(event.sortField);
63+
sorting.value.field = event.sortField ? String(event.sortField) : '';
6464
sorting.value.order = event.sortOrder || 1;
6565
fetchData().then(() => {
6666
scrollToTop();

0 commit comments

Comments
 (0)