How to use the patternfly-react.Paginator.defaultProps function in patternfly-react

To help you get started, we’ve selected a few patternfly-react 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 Katello / katello / webpack / components / PaginationRow / index.js View on Github external
return (
      
    );
  }
}

PaginationRow.defaultPerPageOptions = defaultPerPageOptions;

PaginationRow.defaultProps = {
  onChange: () => {},
  ...Paginator.defaultProps,
};

PaginationRow.propTypes = {
  /** page and per-page selection callback */
  onChange: PropTypes.func,
  pagination: PropTypes.shape({
    /** the current page */
    page: PropTypes.number,
    /** the current per page setting */
    perPage: PropTypes.number,
    /** per page options */
    perPageOptions: PropTypes.array,
  }),
  ...Paginator.propTypes,
};
github theforeman / foreman / webpack / assets / javascripts / react_app / components / Pagination / Pagination.js View on Github external
pagination={
        isEmpty(pagination)
          ? {
              page: urlPage,
              perPage: urlPerPage || data.perPage,
              perPageOptions: data.perPageOptions,
            }
          : pagination
      }
      viewType={data.viewType}
      itemCount={data.itemCount}
      onPageSet={onPageSet}
      onPerPageSelect={onPerPageSelect}
      disableNext={disableNext}
      disablePrev={disablePrev}
      messages={translateObject(Paginator.defaultProps.messages)}
      className={className}
      dropdownButtonId={dropdownButtonId}
      {...otherProps}
    />
  );
};
github theforeman / foreman / webpack / assets / javascripts / react_app / components / Pagination / PaginationWrapper.js View on Github external
return (
    
  );
};

PaginationWrapper.defaultProps = {
  onChange: () => {},
  viewType: 'list',
  ...Paginator.defaultProps,
};

PaginationWrapper.propTypes = {
  ...Paginator.propTypes,
  /** page and per-page selection callback */
  onChange: PropTypes.func,
  /** view type */
  viewType: PropTypes.string,
  /** pagination */
  pagination: PropTypes.shape({
    /** the current page */
    page: PropTypes.number,
    /** the current per page setting */
    perPage: PropTypes.number,
    /** per page options */
    perPageOptions: PropTypes.arrayOf(PropTypes.number),