chore: release v1.1.3

Fix column sort headers so a third click clears the sort and restores
the list's default order.
This commit is contained in:
Steven RYDELL
2026-08-01 23:31:27 +02:00
parent 41b3824894
commit eda20cbe2f
4 changed files with 15 additions and 6 deletions
+7 -3
View File
@@ -1018,12 +1018,16 @@ export function DynamicList({ viewName }: DynamicListProps) {
});
}, []);
// Cycle: unsorted → ascending → descending → unsorted (default).
const toggleSort = useCallback((field: string) => {
setSort((prev) => {
if (prev?.field === field) {
return { field, ascending: !prev.ascending };
if (prev?.field !== field) {
return { field, ascending: true };
}
return { field, ascending: true };
if (prev.ascending) {
return { field, ascending: false };
}
return null;
});
}, []);