Permalink
Browse files

fix: 优化tab操作,如果下一列不可以编辑则跳过

  • Loading branch information...
1 parent 17dfc7b commit 4a4ed1872d1ca6c2274a26f8a226010827a9474c liuyk committed Nov 9, 2016
Showing with 34 additions and 5 deletions.
  1. +14 −0 dist/js/u-grid.js
  2. +5 −5 dist/js/u-grid.min.js
  3. +15 −0 js/re_gridCompEdit.js
View
@@ -5448,8 +5448,22 @@
return;
}
}
+
+ colIndex = _getNextEditColIndex(this, colIndex);
this.editRowFun($tr, colIndex);
};
+
+ var _getNextEditColIndex = function _getNextEditColIndex(gridObj, nowIndex) {
+ // 如果下一列为隐藏/不可修改/复选框则跳到下一个
+ var colIndex = -1;
+ var column = gridObj.gridCompColumnArr[nowIndex];
+ if (!column.options.visible || !column.options.editable) {
+ colIndex = _getNextEditColIndex(gridObj, nowIndex + 1);
+ } else {
+ colIndex = nowIndex;
+ }
+ return colIndex;
+ };
var editValueChange = function editValueChange(field, value) {
// 设置row的值为新值
if (this.eidtRowIndex > -1 && this.eidtRowIndex < this.dataSourceObj.rows.length) {
Oops, something went wrong.

0 comments on commit 4a4ed18

Please sign in to comment.