React-table: Cannot import react table css and cannot override default classes styles?

Created on 28 Jan 2018  路  7Comments  路  Source: tannerlinsley/react-table

can't figure out why adding import 'react-table/react-table.css' below import ReactTable from 'react-table'; doesn't add style on react-table and feels like no css is imported? I have to resort on importing CDN on index.html <link rel="stylesheet" href="https://unpkg.com/react-table@latest/react-table.css">, but my problem is, I cannot override css of the default classes? how can I override css of default classes and import react-table/react-table.css? why is it not working and affecting table?

All 7 comments

What build environment are you using?

Your webpack/babel/etc configuration needs to know how to import .css files.

Also check your doctype is correct as this also impacts the styling....

https://github.com/react-tools/react-table/wiki/FAQ#my-reacttable-doesnt-seem-to-display-properly-on-browser-x---help

Since this is a question of implementation we invite you to continue the conversation in the react tools slack organization. Thanks! https://react-chat-signup.herokuapp.com/

Did you ever figure out how to get this to work? I've been struggling with the same thing and can't seem to figure out how to config webpack to get around the issue

If you are using webpack. it is likely you are excluding to parse 'node_modules' files. Since the style sheet is in

node_modules/react-table/react-table.css

You would need to change webpack config or just copy and paste the file into your style project folder.

src/styles/react-table.css

Is there any update on this? I'm running into the same issue and have been working tirelessly to resolve it to no avail.

I tried copying the .css file directly into my project, it didn't load maybe because it contains const??

@technificentConsulting Same issue 馃槥

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bdkersey picture bdkersey  路  3Comments

Codar97 picture Codar97  路  3Comments

Abdul-Hameed001 picture Abdul-Hameed001  路  3Comments

mellis481 picture mellis481  路  3Comments

monarajhans picture monarajhans  路  3Comments