scrollToFocus to cell with enableCellEditOnFocus=true does not make the cell editable

孤街醉人 提交于 2020-01-06 12:16:11

问题


In the version 3.0.0-rc.21 of angular-ui-grid calls to scrollToFocus() to a cell in a grid with enableCellEditOnFocus set to true would move the cursor to that cell and it would be immediately editable. In version 3.0.7 this no longer works in certain cases (see below).

I call the scrollToFocus() after a navigate (tab) event. It checks the values of certain cells and will jump the user to the next line based on a certain condition. However, if the cell that the user would have tabbed to without the scrollToFocus() is editable, then I think it sends an endEdit event and the cell the user has the focus on is no longer editable.

If the cell that the user would have tabbed to is not editable, the scrollToFocus() works fine.

Please see the Plunker which has instructions on how to prove the issue. http://plnkr.co/edit/bV9CYdHEEksvRtFUglhr?p=preview

Basically, this line shows the issue

{ name: 'name2', displayName: 'Name2 (editable)', width: '20%', enableCellEdit: true },

If the line is like this, all works fine

{ name: 'name2', displayName: 'Name2 (editable)', width: '20%', enableCellEdit: false },

来源:https://stackoverflow.com/questions/33991169/scrolltofocus-to-cell-with-enablecelleditonfocus-true-does-not-make-the-cell-edi

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!