Skip to content

Conversation

@fhlavac
Copy link
Contributor

@fhlavac fhlavac commented Nov 8, 2024

RHCLOUD-36100

  • added useDataViewSort hook to DataView
  • added docs and examples
  • enhanced tests
Snímek obrazovky 2024-11-20 v 18 06 16

@patternfly-build
Copy link

patternfly-build commented Nov 8, 2024

@fhlavac fhlavac marked this pull request as ready for review November 20, 2024 17:11
@fhlavac fhlavac merged commit 4cdda96 into patternfly:v5 Nov 21, 2024
7 checks passed
const validDirection = validateDirection(currentDirection, defaultDirection);
currentSortBy !== state.sortBy || validDirection !== state.direction && setState({ sortBy: currentSortBy, direction: validDirection });
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [ searchParams?.toString() ]);
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is too broad IMO. We should only look at the sort params. Your effect will trigger on any search param change. So for pagination for example. Which is not needed.

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.

4 participants