Skip to content
Source
Sign inSign up
TanStack/table

Not including styles but JS styles applied #39

Closedreintroducing(GitHub profile, opens in a new tab) opened this issue 3 comments

Hello, I've just begun using react-table in a project and I wanted to roll my own styling. When inspecting the DOM elements I see a few of them get some styles in the style tag (presumably through JS since I'm not applying any styles yet). Both rt-th and rt-td get flex and width styles and rt-tbody gets a min-width. I would have expected absolutely no styling on the components when not including CSS or an option to turn off any JS styling so that I don't have to have !importants in my styles where I want to override these values (not to mention I'm not using Flexbox because of browser support constraints).

Is there any way to completely remove ALL the styles?

  1. Well, the only way currently would be to override all of the core components that you want to control manually. See Component Overrides. That way you could implement actual table elements and suppress/overwrite the inline styles with your own.

    Down the road I may include an option to disable all React-Table generated inline-styles.

  2. Got it, thanks.

    I may be heading down the component overrides path anyway to handle some of what I want to do so this makes sense. Appreciate the quick reply.

  3. You bet!

Sign in to join this conversation.