core: add extensive grouping/sorting tests

This commit is contained in:
Abdullah Atta
2024-03-26 07:55:23 +05:00
parent 3a5ea3e8ef
commit e007f2592c
3 changed files with 1290 additions and 142 deletions

View File

@@ -527,7 +527,8 @@ export class FilteredSelector<T extends Item> {
const sortBy: Set<SortOptions["sortBy"]> = new Set();
if (isGroupOptions(options)) {
if (options.groupBy === "abc") sortBy.add("title");
else if (options.sortBy === "title") sortBy.add("dateCreated");
else if (options.sortBy === "title" && options.groupBy !== "none")
sortBy.add("dateCreated");
}
sortBy.add(options.sortBy);