diff --git a/CHANGELOG.md b/CHANGELOG.md index bbf13b0..eb1b56c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). +## [1.1.3] - 2026-08-01 + +### Fixed +- Column sort headers now cycle unsorted → ascending → descending → unsorted, so a third click clears the sort and restores the list's default order (previously stuck alternating between ascending and descending). + ## [1.1.2] - 2026-08-01 ### Added diff --git a/package-lock.json b/package-lock.json index 9061fa3..8d981c9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "stalwart-webui-fork", - "version": "1.1.2", + "version": "1.1.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "stalwart-webui-fork", - "version": "1.1.2", + "version": "1.1.3", "dependencies": { "@daypicker/react": "^10.0.1", "@radix-ui/react-alert-dialog": "^1.1.23", diff --git a/package.json b/package.json index d9f4434..b1999de 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "stalwart-webui-fork", "private": true, - "version": "1.1.2", + "version": "1.1.3", "description": "Stalwart WebUI Fork", "type": "module", "scripts": { diff --git a/src/components/lists/DynamicList.tsx b/src/components/lists/DynamicList.tsx index c36e0c4..e513709 100644 --- a/src/components/lists/DynamicList.tsx +++ b/src/components/lists/DynamicList.tsx @@ -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; }); }, []);