Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
);
}
}
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;
/* 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,