Skip to content

feat: add sortByGroupFirst prop to ReqoreCollection#515

Merged
Foxhoundn merged 2 commits intodevelopfrom
feature/collection-sort-by-group-first
Feb 27, 2026
Merged

feat: add sortByGroupFirst prop to ReqoreCollection#515
Foxhoundn merged 2 commits intodevelopfrom
feature/collection-sort-by-group-first

Conversation

@Foxhoundn
Copy link
Member

Summary

  • Adds sortByGroupFirst prop (default: true) to ReqoreCollection that controls whether group sorting takes priority over the user's chosen sort field
  • When sortByGroupFirst={false}, items are sorted by the selected sortBy field first (e.g., search relevance) and rendered in flat order with inline group headers — no longer re-grouped alphabetically
  • Includes unit test and Storybook story (SortByRelevanceAcrossGroups) demonstrating the search relevance use case

Closes #514

Test plan

  • All 344 existing tests pass
  • New test verifies items are sorted by relevance across groups with sortByGroupFirst={false}
  • yarn precheck passes (lint + test + build)
  • Verify SortByRelevanceAcrossGroups story renders items by relevance with inline group headers
  • Verify default behavior (sortByGroupFirst={true}) is unchanged in existing stories

🤖 Generated with Claude Code

Allow sorting by a custom field (e.g., search relevance) across groups
while keeping visual group headers. When sortByGroupFirst={false}, items
are sorted by the chosen field first and rendered in flat order with
inline group dividers instead of being re-grouped alphabetically.

Closes #514

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@Foxhoundn Foxhoundn force-pushed the feature/collection-sort-by-group-first branch from c32b9f0 to 9374823 Compare February 27, 2026 12:54
@Foxhoundn Foxhoundn merged commit 1461197 into develop Feb 27, 2026
8 checks passed
@Foxhoundn Foxhoundn deleted the feature/collection-sort-by-group-first branch February 27, 2026 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ReqoreCollection: support primary sort field that takes priority over group sorting

1 participant