material-table
material-table copied to clipboard
How do I customize the cell for check box?
export const elementSize = (props) =>
props.options.padding === "default" ? "medium" : "small";
export const baseIconSize = (props) =>
elementSize(props) === "medium" ? 48 : 32;
renderActions() {
const size = CommonValues.elementSize(this.props);
const actions = CommonValues.rowActions(this.props);
const width = actions.length * CommonValues.baseIconSize(this.props);
return (
<TableCell
size={size}
padding="none"
key="key-actions-column"
style={{
width: width,
padding: "0px 5px",
boxSizing: "border-box",
...this.props.options.actionsCellStyle,
}}
>
<div style={{ display: "flex" }}>
<this.props.components.Actions
data={this.props.data}
actions={actions}
components={this.props.components}
size={size}
disabled={this.props.hasAnyEditingRow}
/>
</div>
</TableCell>
);
}
Is it impossible to customize the check box?
https://material-table.com/#/docs/features/component-overriding
Override Row component if needed. You can also pass selectionProps if that is sufficient.
Thanks @mindaugasnakrosis for your suggestion.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You can reopen it if it required.