Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// BpkDataTableColumn is just a props wrapper since Table only accepts Column children
// BpkDataTable uses BpkDataTableColumn.toColumn to convert BpkDataTableColumn to Columns
const BpkDataTableColumn = () => null;
BpkDataTableColumn.toColumn = (bpkDataTableColumn, key) => {
const { className, ...rest } = bpkDataTableColumn.props;
const classNames = [getClassName('bpk-data-table-column')];
if (className) {
classNames.push(className);
}
return ;
};
BpkDataTableColumn.propTypes = { ...Column.propTypes };
BpkDataTableColumn.defaultProps = {
...Column.defaultProps,
headerRenderer: bpkHeaderRenderer,
};
export default BpkDataTableColumn;
type Props = {
/** Checkbox renderer */
checkboxRenderer?: CheckboxRenderer,
};
class Column extends React.Component {
static defaultProps = {
...BaseColumn.defaultProps,
headerRenderer: defaultHeaderRenderer,
checkboxRenderer: defaultCheckboxRenderer,
};
static HeaderRenderer = defaultHeaderRenderer;
static propTypes = BaseColumn.propTypes;
render() {
return ;
}
}
export default Column;