How to use @devexpress/dx-grid-core - 7 common examples

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 deranjer / goTorrent / goTorrentWebUI / node_modules / @devexpress / dx-react-grid-material-ui / dist / dx-react-grid-material-ui.cjs.js View on Github external
var PaginationBase = function PaginationBase(_ref2) {
  var totalPages = _ref2.totalPages,
      totalCount = _ref2.totalCount,
      pageSize = _ref2.pageSize,
      currentPage = _ref2.currentPage,
      onCurrentPageChange = _ref2.onCurrentPageChange,
      getMessage = _ref2.getMessage,
      classes = _ref2.classes;

  var from = dxGridCore.firstRowOnPage(currentPage, pageSize, totalCount);
  var to = dxGridCore.lastRowOnPage(currentPage, pageSize, totalCount);

  return React.createElement(
    'div',
    { className: classes.pagination },
    React.createElement(
      'span',
      { className: classes.rowsLabel },
      getMessage('info', { from: from, to: to, count: totalCount })
    ),
    React.createElement(
      IconButton,
      {
        className: classNames(classes.arrowButton, classes.prev),
        disabled: currentPage === 0,
        onClick: function onClick() {
github atanasster / grommet-nextjs / components / dx-react-grid-grommet / src / templates / paging-panel / pagination.js View on Github external
export const Pagination = ({
  totalPages,
  totalCount,
  pageSize,
  currentPage,
  onCurrentPageChange,
  getMessage,
}) => {
  const from = firstRowOnPage(currentPage, pageSize, totalCount);
  const to = lastRowOnPage(currentPage, pageSize, totalCount);

  return (
    
      
      <button>}
        disabled={currentPage === 0}
        onClick={() =&gt; (currentPage &gt; 0) &amp;&amp; onCurrentPageChange(currentPage - 1)}
      /&gt;
      
        {renderPageButtons(currentPage, totalPages, onCurrentPageChange)}
      
      </button>
github deranjer / goTorrent / goTorrentWebUI / node_modules / @devexpress / dx-react-grid-material-ui / dist / dx-react-grid-material-ui.es.js View on Github external
var PaginationBase = function PaginationBase(_ref2) {
  var totalPages = _ref2.totalPages,
      totalCount = _ref2.totalCount,
      pageSize = _ref2.pageSize,
      currentPage = _ref2.currentPage,
      onCurrentPageChange = _ref2.onCurrentPageChange,
      getMessage = _ref2.getMessage,
      classes = _ref2.classes;

  var from = firstRowOnPage(currentPage, pageSize, totalCount);
  var to = lastRowOnPage(currentPage, pageSize, totalCount);

  return React.createElement(
    'div',
    { className: classes.pagination },
    React.createElement(
      'span',
      { className: classes.rowsLabel },
      getMessage('info', { from: from, to: to, count: totalCount })
    ),
    React.createElement(
      IconButton,
      {
        className: classNames(classes.arrowButton, classes.prev),
        disabled: currentPage === 0,
        onClick: function onClick() {
github atanasster / grommet-nextjs / components / dx-react-grid-grommet / src / templates / paging-panel / pagination.js View on Github external
export const Pagination = ({
  totalPages,
  totalCount,
  pageSize,
  currentPage,
  onCurrentPageChange,
  getMessage,
}) =&gt; {
  const from = firstRowOnPage(currentPage, pageSize, totalCount);
  const to = lastRowOnPage(currentPage, pageSize, totalCount);

  return (
    
      
      <button>}
        disabled={currentPage === 0}
        onClick={() =&gt; (currentPage &gt; 0) &amp;&amp; onCurrentPageChange(currentPage - 1)}
      /&gt;
      
        {renderPageButtons(currentPage, totalPages, onCurrentPageChange)}
      
      </button>
github deranjer / goTorrent / goTorrentWebUI / node_modules / @devexpress / dx-react-grid-material-ui / dist / dx-react-grid-material-ui.es.js View on Github external
var PaginationBase = function PaginationBase(_ref2) {
  var totalPages = _ref2.totalPages,
      totalCount = _ref2.totalCount,
      pageSize = _ref2.pageSize,
      currentPage = _ref2.currentPage,
      onCurrentPageChange = _ref2.onCurrentPageChange,
      getMessage = _ref2.getMessage,
      classes = _ref2.classes;

  var from = firstRowOnPage(currentPage, pageSize, totalCount);
  var to = lastRowOnPage(currentPage, pageSize, totalCount);

  return React.createElement(
    'div',
    { className: classes.pagination },
    React.createElement(
      'span',
      { className: classes.rowsLabel },
      getMessage('info', { from: from, to: to, count: totalCount })
    ),
    React.createElement(
      IconButton,
      {
        className: classNames(classes.arrowButton, classes.prev),
        disabled: currentPage === 0,
        onClick: function onClick() {
          return currentPage > 0 && onCurrentPageChange(currentPage - 1);
github deranjer / goTorrent / goTorrentWebUI / node_modules / @devexpress / dx-react-grid-material-ui / dist / dx-react-grid-material-ui.cjs.js View on Github external
var PaginationBase = function PaginationBase(_ref2) {
  var totalPages = _ref2.totalPages,
      totalCount = _ref2.totalCount,
      pageSize = _ref2.pageSize,
      currentPage = _ref2.currentPage,
      onCurrentPageChange = _ref2.onCurrentPageChange,
      getMessage = _ref2.getMessage,
      classes = _ref2.classes;

  var from = dxGridCore.firstRowOnPage(currentPage, pageSize, totalCount);
  var to = dxGridCore.lastRowOnPage(currentPage, pageSize, totalCount);

  return React.createElement(
    'div',
    { className: classes.pagination },
    React.createElement(
      'span',
      { className: classes.rowsLabel },
      getMessage('info', { from: from, to: to, count: totalCount })
    ),
    React.createElement(
      IconButton,
      {
        className: classNames(classes.arrowButton, classes.prev),
        disabled: currentPage === 0,
        onClick: function onClick() {
          return currentPage > 0 && onCurrentPageChange(currentPage - 1);
github atanasster / grommet-nextjs / components / dx-react-grid-grommet / src / templates / paging-panel / pagination.js View on Github external
const renderPageButtons = (
  currentPage,
  totalPageCount,
  onCurrentPageChange,
) =&gt; {
  const pageButtons = [];
  const maxButtonCount = 3;
  let startPage = 1;
  let endPage = totalPageCount || 1;

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

    if (startPage &gt; 2) {
      pageButtons.push((

@devexpress/dx-grid-core

Core library for the DevExtreme Reactive Grid component

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

Package Health Score

86 / 100
Full package analysis