Skip to content
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

Include ui.grid.cellNav in module but not ui-grid-cellNav on table causes errors #2128

Closed
Dev63 opened this issue Nov 17, 2014 · 3 comments
Closed
Assignees
Milestone

Comments

@Dev63
Copy link

Dev63 commented Nov 17, 2014

Including ui.grid.cellNav in your module, but not placing ui-grid-cellNav on a grid, causes many behind-the-scenes Javascript errors (for example, when you scroll the grid you get complaints "TypeError: Cannot read property 'getFocusedCell' of undefined").

Can this be fixed, or is there a workaround? Is there something I could/should do with respect to this sentence in the tutorial: "gridOptions.onRegisterApi callback to register the on_cellNav event and log when the cell is navigated"?

BTW, I'm in this situation because I have different grids on multiple sub-pages. On one of them I do not include the ui-grid-cellNav because I use RowTemplate to enable an ng-click for the entire row, and ui-grid-cellNav interferes with that. I've seen a separate issue where ui-grid-cellNav maybe didn't used to interfere with ng-click in the rowTemplate, and so if that were resolved, this would not be a problem for me (although it does seem like something that should be fixed anyway).

@Dev63 Dev63 changed the title Include ui.grid.cellNav in module but ui-grid-cellNav on table causes errors Include ui.grid.cellNav in module but not ui-grid-cellNav on table causes errors Nov 17, 2014
@PaulL1 PaulL1 added this to the 3.0 milestone Nov 17, 2014
@PaulL1
Copy link
Contributor

PaulL1 commented Nov 17, 2014

@c0bra: unfortunately, probably this one is for you, since it's probably to do with the cellNav rewrite.

@nairys
Copy link

nairys commented Nov 24, 2014

Thanks for posting this - I was getting "TypeError: Cannot read property 'getFocusedCell' of undefined" whenever I was scrolling through a table with my mousewheel. I had left ui.grid.cellNav in my module but wasn't using it anymore anywhere in my app. Once I took it out, the error went away when I scrolled through the table.

One less thing for me to debug :)

@colorfulgrayscale
Copy link

I'm having the same issues as @nairys

 TypeError: Cannot read property 'getFocusedCell' of undefined
    at /angular-ui-grid/ui-grid.js:11418:48
    at Scope.$broadcast (/angular/angular.js:13070:28)
    at self.fireScrollingEvent.gridUtil.throttle.trailing (/angular-ui-grid/ui-grid.js:2959:16)
    at runFunc (/angular-ui-grid/ui-grid.js:9274:12)
    at /angular/angular.js:14394:28
    at completeOutstandingRequest (/angular/angular.js:4411:10)
    at /angular/angular.js:4725:7

This happens only when the 'ui.grid.cellNav' module is included in the app AND the 'ui-grid-cellNav' directive is not included in the markup.

@c0bra c0bra self-assigned this Dec 2, 2014
@c0bra c0bra closed this as completed in 9bfa6e3 Dec 2, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants