Skip to content

[refactor] move exclusiveSort to a data context, fixed to initial value#455

Merged
severo merged 2 commits intomasterfrom
simplify
Mar 4, 2026
Merged

[refactor] move exclusiveSort to a data context, fixed to initial value#455
severo merged 2 commits intomasterfrom
simplify

Conversation

@severo
Copy link
Copy Markdown
Contributor

@severo severo commented Mar 4, 2026

see #449

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR continues the refactor from issue #449 by moving the exclusiveSort flag out of direct data access and into the data-layer context so consumers can read a stable, initial value and reduce unnecessary prop plumbing.

Changes:

  • Add ExclusiveSortContext + useExclusiveSort() to DataContext.
  • Initialize exclusiveSort once in DataProvider (fixed to the data frame’s initial value) and provide it via context.
  • Update HighTable/Slice to consume exclusiveSort from context instead of data.exclusiveSort.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/providers/DataProvider.tsx Captures exclusiveSort on mount and provides it via a new context provider.
src/contexts/DataContext.ts Introduces ExclusiveSortContext and a useExclusiveSort hook for consumption.
src/components/HighTable/Slice.tsx Switches TableHeader’s exclusiveSort prop source to the new context hook.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/components/HighTable/Slice.tsx
@severo severo merged commit d6e2edd into master Mar 4, 2026
5 checks passed
@severo severo deleted the simplify branch March 4, 2026 09:50
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.

2 participants