-
Notifications
You must be signed in to change notification settings - Fork 2
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(features): initial work on making cell nav conditional #62
Conversation
|
||
var row = rowCol.row, | ||
col = rowCol.col; | ||
function setupCellNav() { |
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.
I'm apparently really bad at following indentation, but you wrapped all of this stuff in setupCellNav, right?
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.
Basically yeah. Most of this stuff has just been moved into this function so we can toggle the behavior
Alright with these new revisions I think the feature is working as I would expect it to. Can everyone please take a read over this code before I start doing some refactoring. I think I need to move function definitions around a bit to make this code easier to read. |
src/js/core/factories/GridApi.js
Outdated
@@ -249,16 +249,19 @@ | |||
$rootScope.$emit.apply($rootScope, [eventId].concat(Array.prototype.slice.call(arguments))); | |||
}; | |||
|
|||
var cleanup = []; |
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.
This is basically the same thing as the destroySteps from above, right? You may want to consider unifying their naming convention
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.
Yeah it's just scoped differently. I will start doing some real clean up an variable consistency type changes
} | ||
|
||
destroySteps.forEach(function(destory) { | ||
destory(); |
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.
Typo in destory
src/features/cellnav/js/cellnav.js
Outdated
evt.preventDefault(); | ||
} | ||
// Refresh cell focus when a new row id added to the grid | ||
dataChangeDereg = uiGridCtrl.grid.registerDataChangeCallback(function (grid) { |
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.
If everything else just adds to destroySteps, why not do that here too?
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.
Seems all resonable to me, but its hard to tell for sure as its so large...
feat(cellnav): added column name to aria alert on cell nav
Initial work. This appears to be working to toggle between an active and inactive state. I think I will have to clean this up more but this is a first draft.