material-table icon indicating copy to clipboard operation
material-table copied to clipboard

How do I customize the cell for check box?

Open seungwoohong opened this issue 5 years ago • 3 comments

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?

seungwoohong avatar Dec 29 '20 07:12 seungwoohong

https://material-table.com/#/docs/features/component-overriding

Override Row component if needed. You can also pass selectionProps if that is sufficient.

mindaugasnakrosis avatar Jan 05 '21 13:01 mindaugasnakrosis

Thanks @mindaugasnakrosis for your suggestion.

seungwoohong avatar Jan 11 '21 04:01 seungwoohong

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.

stale[bot] avatar Apr 11 '21 05:04 stale[bot]