-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
fix(replay) - useReplayTableSort now properly uses DEFAULT_SORT #102882
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
Conversation
ryan953
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the useRef probably isn't doing anything useful actually in this hook. It's applied to the sortType outside of useCallback, so values returned from the hook will be 'new' each time because the value inside .current is new each time.
Looks good for better sort defaults.
Before we had -started_at and asc which are not the same sort direction. Now we have -started_at and desc which are the same!
|
@ryan953 I removed the useRef and tested. Let me know your thoughts! |
useReplayTableSort isn't using the
DEFAULT_SORTtable as it should be.