Ag grid 如何启用选项卡导航到其他行组中的下一个可编辑单元格?
我正在使用ag grid enterprise 4.0.7构建一个应用程序,它使用行组并具有可编辑字段,可编辑单元格之间的键盘导航非常重要 内置的选项卡导航功能很好,但只能在行组中使用。到达组中的最后一个可编辑单元格后,按tab键不会跳转到下一个组中的下一个可编辑单元格,而是跳转到页面上的某个不相关元素 下面是一个基于ag grid文档示例的示例,运动员的姓名是可编辑的,选项卡导航到下一个运动员,但仅在一个国家/地区内: 这是故意的行为吗?扩展选项卡导航以跳转到另一个组中的下一个可编辑项的最干净方法是什么Ag grid 如何启用选项卡导航到其他行组中的下一个可编辑单元格?,ag-grid,Ag Grid,我正在使用ag grid enterprise 4.0.7构建一个应用程序,它使用行组并具有可编辑字段,可编辑单元格之间的键盘导航非常重要 内置的选项卡导航功能很好,但只能在行组中使用。到达组中的最后一个可编辑单元格后,按tab键不会跳转到下一个组中的下一个可编辑单元格,而是跳转到页面上的某个不相关元素 下面是一个基于ag grid文档示例的示例,运动员的姓名是可编辑的,选项卡导航到下一个运动员,但仅在一个国家/地区内: 这是故意的行为吗?扩展选项卡导航以跳转到另一个组中的下一个可编辑项的最干净
谢谢 这种方法对我很有效:
myTabToNextCell(params) {
const previousCell = params.previousCellDef;
const lastRowIndex = previousCell.rowIndex;
let nextRowIndex = lastRowIndex + 1;
// TODO renderedRowCount must contain the row count.
const renderedRowCount = this.state.rowCount;
// if (nextRowIndex >= renderedRowCount) { nextRowIndex = 0; }
if (nextRowIndex < renderedRowCount) { nextRowIndex = lastRowIndex + 1; } else {
nextRowIndex = 0;
}
const result = {
rowIndex: nextRowIndex,
column: previousCell.column,
floating: previousCell.floating
};
return result;
}
myTabToNextCell(参数){
const-previousCell=params.previousCellDef;
常量lastRowIndex=previousCell.rowIndex;
设nextRowIndex=lastRowIndex+1;
//TODO RenderRowCount必须包含行计数。
const renderrowcount=this.state.rowCount;
//如果(nextRowIndex>=renderrowcount){nextRowIndex=0;}
如果(nextRowIndex
仅当网格选项属性groupUseEntireRow=true
如所述时,才会发生所述行为。我认为这是一个错误。
myTabToNextCell(params) {
const previousCell = params.previousCellDef;
const lastRowIndex = previousCell.rowIndex;
let nextRowIndex = lastRowIndex + 1;
// TODO renderedRowCount must contain the row count.
const renderedRowCount = this.state.rowCount;
// if (nextRowIndex >= renderedRowCount) { nextRowIndex = 0; }
if (nextRowIndex < renderedRowCount) { nextRowIndex = lastRowIndex + 1; } else {
nextRowIndex = 0;
}
const result = {
rowIndex: nextRowIndex,
column: previousCell.column,
floating: previousCell.floating
};
return result;
}