How to use the react-virtualized.Table.defaultProps function in react-virtualized

To help you get started, we’ve selected a few react-virtualized 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 Skyscanner / backpack / packages / bpk-component-datatable / src / BpkDataTable.js View on Github external
);
  }
}

BpkDataTable.propTypes = {
  ..._omit(Table.propTypes, omittedTableProps),
  rows: PropTypes.arrayOf(Object).isRequired,
  children: hasChildrenOfType(BpkDataTableColumn),
  width: PropTypes.number,
  headerHeight: PropTypes.number,
  className: PropTypes.string,
  defaultColumnSortIndex: PropTypes.number,
};

BpkDataTable.defaultProps = {
  ...Table.defaultProps,
  width: null,
  headerHeight: 60,
  rowHeight: 60,
  gridStyle: { direction: undefined }, // This is required for rows to automatically respect rtl
  defaultColumnSortIndex: 0,
};

export default BpkDataTable;
github GSS-FED / vital-ui-kit-react / packages / table / src / SimpleTable / SimpleTable.jsx View on Github external
/* eslint-disable react/forbid-foreign-prop-types */
BaseTable.propTypes.children = () => {};
/* eslint-enable */

const StyledTable: React.ComponentType = styled(
  BaseTable,
)``;

type Props = TableProps & {
  hasHorizontalBorder?: boolean,
  striped?: boolean,
};

class SimpleTable extends React.Component {
  static defaultProps = {
    ...BaseTable.defaultProps,
    rowRenderer: defaultRowRenderer,
    headerRowRenderer: defaultHeaderRowRenderer,
    hasHorizontalBorder: false,
    rowHeight: 40,
    striped: true,
    headerHeight: 40,
  };

  static HeaderRowRenderer = defaultHeaderRowRenderer;

  static RowRenderer = defaultRowRenderer;

  render() {
    const {
      hasHorizontalBorder,
      hasVerticalBorder,