Devextreme-reactive: How to change table border styles

Created on 1 Jul 2019  路  3Comments  路  Source: DevExpress/devextreme-reactive

const TableRowStyle = ({ row, ...restProps }) => (
  <Table.Row
    {...restProps}
    style={{
      cursor: "pointer",
      color: "#ABC3CF",
      height: 60,
      border: "1px solid black"
    }}
  />
);

  <Table
              cellComponent={this.tableCellStyle}
              columnExtensions={tableColumnExtensions}
              rowComponent={TableRowStyle}
            />

Thanks for the help!

Grid question

Most helpful comment

const styles = theme => ({
  tableBorder: {
    border: "1px solid black",
    color: "#ABC3CF",
  },
});

const TableComponentBase = ({ classes, ...restProps }) => (
  <Table.Table
    {...restProps}
    className={classes.tableBorder}
  />
);

export const TableHeaderComponent = withStyles(styles, { name: 'TableHeaderComponent' })(TableHeaderComponentBase);

<Table tableComponent={TableComponent} />

Try this. It worked for me.

All 3 comments

const styles = theme => ({
  tableBorder: {
    border: "1px solid black",
    color: "#ABC3CF",
  },
});

const TableComponentBase = ({ classes, ...restProps }) => (
  <Table.Table
    {...restProps}
    className={classes.tableBorder}
  />
);

export const TableHeaderComponent = withStyles(styles, { name: 'TableHeaderComponent' })(TableHeaderComponentBase);

<Table tableComponent={TableComponent} />

Try this. It worked for me.

@drilus
Thank you so much! it works!

This thread has been automatically locked since it is closed and there has not been any recent activity. Please open a new issue for related bugs or feature requests.

Was this page helpful?
0 / 5 - 0 ratings