Keyboard navigation for rowBasedSelection mode#119
Open
ckosmowski wants to merge 19 commits into
Open
Conversation
In row based mode: Added support for keyboard navigation which makes more sense in the row based mode. 1) Introduced seperated "handleKeyDownRowBased" method which handles key events when in row based mode 2) Added method "handleNavigateKey" as a shortcut for keys which need to commit cell edit first 3) Added option "selectOnNavigate" which enables the user to select rows via the keyboard when in row based mode Code duplication in handleKeyDown and handleKeyDownRowBased can possibly be resolved further. Kept the code in seperate methods for now to be sure to preserve the default behaviour.
Owner
There was a problem hiding this comment.
Yeah, there is a lot of code duplication here. I recommend having 'if self.options.rowBasedSelection' statements inside the main handleKeyDown method instead where needed. That way you can also have a little comment explaining why the keyboard navigation does something different for rowBasedSelection (ie. "When using rowBasedSelection, up/down keys change the selection of rows instead of moving the active cell.)
Collaborator
Author
|
Hope it's still mergeable at all. |
This file contains hidden or 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
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.
Added Keyboard navigation for rowBasedSelection mode. (Using keyboard navigation and selection in a way that makes more sense when used with rowBasedSelection)