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

Mui table how to set horizontal scroll?

Open ghost opened this issue 11 years ago • 4 comments

the table.js bodyTable: { height: this.props.fixedHeader || this.props.fixedFooter ? this.props.height : 'auto', overflowX: 'hidden', overflowY: 'auto' }, How can we change overflowX ?

ghost avatar Oct 08 '15 07:10 ghost

May be It does support change the table overflowX.

ghost avatar Oct 08 '15 07:10 ghost

now workaround way: componentDidMount() { $('.mui-body-table').css('overflow-x', 'auto'); }

ghost avatar Oct 08 '15 08:10 ghost

It doesn't look like there's a way to override it in the code: https://github.com/callemall/material-ui/blob/master/src/table/table.jsx#L90

But I'll try your workaround. Thanks

elie222 avatar Dec 10 '15 17:12 elie222

I got it by passing to Table component via props:

bodyStyle: { overflowX: undefined, overflowY: undefined }

But it disable the fixedHeader :(

almoraleslopez avatar Feb 10 '16 10:02 almoraleslopez