Skip to content

cellNav in 3.0.0-rc.16 preventing ng-click in rowTemplate to fire.  #2109

@gregwym

Description

@gregwym

Hi Angular UI team,

ui-grid 3.0.0 being working great for us. Thanks a lot for this awesome new version.

Before rc.16, I'm using rowTemplate with ng-click in the same way as the example in http://ui-grid.info/docs/#/api/ui.grid.class:GridOptions. It was working great with selection and cellNav plugin.

Since rc.16, when I have cellNav enabled, it is preventing the ng-click from firing. This could be introduced with the recent improvement in #2084.

Actually, what I'm trying to achieve from these plugins

  • Scroll to a row (i.e., after adding a new entity)
  • Allow single select when clicking on the rows, and allow multi-select when clicking on the row header checkmarks at the same time.

IMO, scrollToRow is a basic grid usage which should be an API of the grid, instead of bundled together with cellNav. Or can be a separate plugin called rowNav.

Workarounds that I have tried:

  • Call gridApi.selection.selectRow() in navigate event handler instead of ng-click in template
    • The row is selected after a noticeable delay.
  • Remove cellNav plugin
    • This restore ng-click so I can click and select a row even when enableRowHeaderSelection is true.
    • Loss ability to scroll to a row
  • Remove evt.stopPropagation(); inside uiGridCell directive's on click even handler
    • This doesn't do anything. Prob not the cause.

I will stick with rc.15 for now.

Thanks,
Greg

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions