Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(withTableSorting): add control the use of data sorting #1032

Merged
merged 1 commit into from
Oct 4, 2023

Conversation

zzzorgo
Copy link
Contributor

@zzzorgo zzzorgo commented Oct 2, 2023

The method isControlledState() in this HOC is for determining whether the sortState is provided externally or not. It shouldn't turn off the whole sorting as it does in this case making the whole HOC useless.

@zzzorgo zzzorgo force-pushed the table-fix-sorting-controoled branch from e93954b to 3d2319d Compare October 2, 2023 14:38
@zzzorgo
Copy link
Contributor Author

zzzorgo commented Oct 2, 2023

@ValeraS Pushed the change in accord with your comment

@gravity-ui-bot
Copy link
Contributor

Preview is ready.

@@ -28,6 +28,7 @@ export interface WithTableSortingProps {
defaultSortState?: SortState;
sortState?: SortState;
onSortStateChange?: (sortState: SortState) => void;
useExternalSorting?: boolean;
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's rename to

Suggested change
useExternalSorting?: boolean;
disableDataSorting?: boolean;

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ValeraS Done :)

@zzzorgo zzzorgo force-pushed the table-fix-sorting-controoled branch from 3d2319d to 4c16983 Compare October 4, 2023 08:08
@zzzorgo zzzorgo requested review from amje and korvin89 as code owners October 4, 2023 08:08
@zzzorgo zzzorgo force-pushed the table-fix-sorting-controoled branch from 4c16983 to 32af455 Compare October 4, 2023 08:08
@zzzorgo zzzorgo force-pushed the table-fix-sorting-controoled branch from 32af455 to 8cee379 Compare October 4, 2023 11:53
@ValeraS ValeraS changed the title fix(Table): fixed not working sorting when controlled sortState is used feat(withTableSorting): add control the use of data sorting Oct 4, 2023
@ValeraS ValeraS merged commit 53248c9 into gravity-ui:main Oct 4, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants