Mui-datatables: Render without Toolbar when no options are true?

Created on 12 Nov 2018  路  7Comments  路  Source: gregnb/mui-datatables


When all options for the toolbar are set to false, the toolbar still renders as empty and takes up alot of dom space.

Expected Behavior


If all toolbar options are false, then no toolbar should render - or a prop to disable it should be available.

Current Behavior

Steps to Reproduce (for bugs)

screen shot 2018-11-12 at 4 15 29 pm

Your Environment

| Tech | Version |
|--------------|---------|
| Material-UI | 3.2 |
| MUI-datatables | 2.0.0-beta-37 |
| React | 16.3.2 |
| browser | Any |
| etc | |

bug

All 7 comments

Do you wish to submit a PR for this?

Ill give it a go @gregnb - never submitted one before, but always willing to have a go :)

Would love this!

As a workaround, you can just do this with createMuiTheme

const theme = createMuiTheme({ overrides: { MuiToolbar: { root: { display: "none" } } } });

To hide just the datatable toolbar
const theme = createMuiTheme({overrides: { MUIDataTableToolbar: { root: { display: 'none' } } }})

It's been quite a while, so I opened a PR for this here: https://github.com/gregnb/mui-datatables/pull/564.

Fixed in latest 2.0.0-beta.59. @kylane

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mhmmdakbr picture mhmmdakbr  路  4Comments

JordanKadish picture JordanKadish  路  4Comments

demoreno picture demoreno  路  4Comments

chapmanjacobd picture chapmanjacobd  路  4Comments

T-pirithiviraj picture T-pirithiviraj  路  3Comments