制表符 - select 行显示在当前页面上

Tabulator - select rows displayed on current page

我在制表符 table 上使用本地分页选项,我试图提供一种方法来选择页面上当前显示的所有行,但我找不到确定行的方法显示在当前页面上,有没有办法做到这一点,如果有,怎么做?

我查看了有关分页和分页模块的文档,但我发现最接近的是 .selectRow(),但它会选择制表符中的所有行,而不仅仅是当前页面。

http://tabulator.info/docs/4.2/page

http://tabulator.info/docs/4.2/modules#module-page

const rows = this.tabulator.getRows(true); // returns array of all the currently filtered/sorted elements 

const currentPage = this.tabulator.getPage(); // returns the current page 
const pageSize = this.tabulator.getPageSize(); // returns the current number of items per page
const start = (currentPage - 1) * pageSize; //start index
// figure out end index, taking into account last page may not be full
if (rows.length < currentPage * pageSize) {
  end = start + (rows.length % pageSize);
} else {
  end = start + pageSize;
}

for (let index = start;index < end;index++) {
    rows[index].select();
}