How to use the @devexpress/dx-grid-core.calculateStartPage function in @devexpress/dx-grid-core

To help you get started, we’ve selected a few @devexpress/dx-grid-core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github atanasster / grommet-nextjs / components / dx-react-grid-grommet / src / templates / paging-panel / pagination.js View on Github external
const renderPageButtons = (
  currentPage,
  totalPageCount,
  onCurrentPageChange,
) => {
  const pageButtons = [];
  const maxButtonCount = 3;
  let startPage = 1;
  let endPage = totalPageCount || 1;

  if (maxButtonCount < totalPageCount) {
    startPage = calculateStartPage(currentPage + 1, maxButtonCount, totalPageCount);
    endPage = (startPage + maxButtonCount) - 1;
  }
  if (startPage > 1) {
    pageButtons.push((
       onCurrentPageChange(0)}
      />
    ));

    if (startPage > 2) {
      pageButtons.push((

@devexpress/dx-grid-core

Core library for the DevExtreme Reactive Grid component

SEE LICENSE IN README.md
Latest version published 3 months ago

Package Health Score

86 / 100
Full package analysis