@atlaskit/dynamic-table
Version:
A dynamic table displays rows of data with built-in pagination, sorting, and re-ordering functionality.
10 lines (9 loc) • 340 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.computeIndex = void 0;
var computeIndex = exports.computeIndex = function computeIndex(index, page, rowsPerPage) {
var itemOnPreviousPages = rowsPerPage && isFinite(rowsPerPage) ? (page - 1) * rowsPerPage : 0;
return index + itemOnPreviousPages;
};