我正在尝试使用班次选择来选择垫子表的多行。 下面是我的代码。这样我就可以获取索引,但是我将如何检索行
方法选择行
selectedRow(row, event, i) {
debugger;
if (this.selection.selected.length > 1) {
this.selection.deselect(this.selection.selected[0]);
}
if (this.selection.selected.length > 0) {
this.isDisabledClearSelectionBtn = false;
}
if ((event.shiftKey, i)) {
debugger;
console.log(row.orderStatus + " /" + row.customStatus);
console.log(i);
this.lastSelected = i;
const indexA = this.lastSelected;
const indexB = index;
if (indexA > indexB) {
// Descending order
this.selectRowsBetween(indexB, indexA);
} else {
// Ascending order
this.selectRowsBetween(indexA, indexB);
}
}
// Calling button function
this.bottomButtonSelected(this.selection.selected[0]);
}
我如何在这里检索行?我想获取行并为该特定行打开一个对话框
private selectRowsBetween(start, end) {
let currentIndex = 0;
if (currentIndex >= start && currentIndex <= end) {
this.selection.select(row);
}
currentIndex++;
}