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

Remove box-shadow around table

Open fgenoese opened this issue 7 years ago • 9 comments

Hi,

I am trying to figure out how to remove the box-shadow around tables. The styling exercises show how to edit columns, rows and cells but the shadow seems to be outside the table.

Any hint?

fgenoese avatar Apr 24 '19 20:04 fgenoese

Hi @fgenoese

You can try overriding container:

import { Paper } from '@material-ui/core';

<MaterialTable
component={{
     Container: props => <Paper {...props} elevation={0}/>
}}
/>

mbrn avatar Apr 24 '19 21:04 mbrn

Unfortunately, the code has no effect, i.e. the resulting HTML still says: <div class="MuiPaper-root-8 MuiPaper-elevation2-12 MuiPaper-rounded-9">...</div>

fgenoese avatar Apr 25 '19 05:04 fgenoese

sorry. Make component => components.

import { Paper } from '@material-ui/core';

<MaterialTable
components={{
     Container: props => <Paper {...props} elevation={0}/>
}}
/>

mbrn avatar Apr 25 '19 05:04 mbrn

Works like a charm - and I learned something new about Material UI styling I guess. Thanks!

fgenoese avatar Apr 25 '19 05:04 fgenoese

sorry. Make component => components.

import { Paper } from '@material-ui/core';

<MaterialTable
components={{
     Container: props => <Paper {...props} elevation={0}/>
}}
/>

is there a way to remove the border-shadow (divider that appears after fixed column) while using fixedColumns property?

dashName avatar May 14 '20 15:05 dashName

Unfortunately, the code has no effect, i.e. the resulting HTML still says: <div class="MuiPaper-root-8 MuiPaper-elevation2-12 MuiPaper-rounded-9">...</div>

I'm having the same

ejrekruit avatar Jun 17 '20 18:06 ejrekruit

I get Property 'component' does not exist on type 'IntrinsicAttributes &

shamoons avatar Jul 20 '20 21:07 shamoons

Hello, I still not remove elevation for paper! Any solution?

PauloJFCabral avatar Aug 30 '20 19:08 PauloJFCabral

I get Property 'component' does not exist on type 'IntrinsicAttributes &

sorry. Make component => components.

import { Paper } from '@material-ui/core';

<MaterialTable
components={{
     Container: props => <Paper {...props} elevation={0}/>
}}
/>

KamauAlex avatar Feb 19 '21 06:02 KamauAlex