angular-ui/ui-grid

rowIndex changes

已关闭

#6,577 创建于 2018年2月17日

 (0 条评论) (0 个反应) (0 位负责人)JavaScript (2,496 个派生)batch import
difficulty: hardhelp wanted

仓库指标

星标
 (5,395 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

Hello,

I have a custom row select function, as in following plunker: http://plnkr.co/edit/dyof0UiGKtvn0gAWcWuu?p=preview

for the first ~10-15 entries, it works awesome (try rightclicking the entries), but after scrolling, the rowIndex kinda changes. I tried changing cellTemplate to have gridApi.grid.renderContainers.body.visibleRowsCache.indexOf(row) instead of rowIndex, but same error afterwards unfortunately. You guys know some fix for that?

I even gave them an id: ... ui-grid-one-bind-id-grid="rowRenderIndex + '-' + row.entity.id + '-' + col.uid + '-cell'" ...

but even this one changes because scrolling kinda changes only the visible data but not the actual one, or the other way round.

Thank you very much for your help.

贡献者指南