-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Fix create multi sort bug #1051
Merged
wuweiweiwu
merged 4 commits into
bvaughn:master
from
lideeyaa:fix-create-multi-sort-bug
Jul 27, 2018
Merged
Fix create multi sort bug #1051
wuweiweiwu
merged 4 commits into
bvaughn:master
from
lideeyaa:fix-create-multi-sort-bug
Jul 27, 2018
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…object when only one sort column is selected
…into fix-create-multi-sort-bug
Hi there! Can you please add some positive and negative test cases to verify your PR's changes? That will help track if this breaks in the future |
wuweiweiwu
approved these changes
Jul 27, 2018
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.
LGTM!
@lideeyaa Thanks for contributing! Planning to release this soon! |
Glad I could help! :) |
errendir
added a commit
to IdeaFlowCo/react-virtualized
that referenced
this pull request
Oct 24, 2018
* bvaughn/master: (54 commits) Update version and changelog for 9.21.0 release (bvaughn#1252) chore: update lockfile Update ci badge (bvaughn#1227) Allow users to override default table row styles (bvaughn#1175) Add onColumnClick to Table (bvaughn#1207) remove unused variable in Masonry.example.js (bvaughn#1218) Fix Table aria attributes (bvaughn#1208) Fix typo in CellMeasurer.DynamicHeightTableColumn.example.js (bvaughn#1190) Update usingAutoSizer.md (bvaughn#1186) Add an extra check for an e.target.className.indexOf function (bvaughn#1210) Fix broken Slack badge image (bvaughn#1205) docs(CellMeasurer): fix `import` statement (bvaughn#1187) Added new friend (bvaughn#1197) Fix createMultiSort bug (bvaughn#1051) adding new usecase example and fix some typos (bvaughn#1168) Updating version to 9.20.1 Update changelog for the 9.20.1 release (bvaughn#1167) Prevent early debounceScrollEndedCallback when there is a slow render (bvaughn#1141) removing sideEffects (bvaughn#1163) fix for bvaughn#998 with test cases (bvaughn#1154) ...
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fixes a bug found in the
createMultiSort
function. When selecting a new column to sort, the original code clears thesortBy
array of all non-selected keys, however, fails to clear thesortDirection
object. By failing to do so, multi-select will not work on any future shift+clicks. Let me explain: in theevent.shiftClick
if-statement block starting on line 59, since the old keys remain in thesortDirection
object, it will never push the new column value to thesortBy
array, and thus only ever returning one key insortBy
. In my PR, I make sure thesortDirection
object is cleared of all the non-selected key-values.