-
Notifications
You must be signed in to change notification settings - Fork 781
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Component should accept className and styles should all be obj OR string #647
Comments
@L5eoneill, all the className accept the string or a function which generate class name dynamically. and the style only accept object which follow jsx principle <BootstrapTable insertRow exportCSV data={ products }
tableStyle={ { border: '#0000FF 2.5px solid' } }
containerStyle={ { border: '#FFBB73 2.5px solid' } }
trClassName='tr-string-example'
>
<TableHeaderColumn dataField='id' isKey={ true }>Product ID</TableHeaderColumn>
<TableHeaderColumn dataField='name'>Product Name</TableHeaderColumn>
<TableHeaderColumn dataField='price'>Product Price</TableHeaderColumn>
</BootstrapTable> BTW, I'm not sure if I've answered your question, feel free to discuss with me :) |
Yeah, doesn't completely address the issue, which is that many of the elements your component creates don't receive class names. Accepting a style object just isn't good enough. We get: react-bs-table-container From your docs, none of these can take on a custom css class name, so if you're using css-modules, you have to work really hard to override even the smallest of default bootstrap stylings, using tricks like !important and :global(.react-bs-table) and such, which are frowned upon. |
@L5eoneill, ok, currently, react-bs-table-container if ok, I can support it in near future. |
Yes, that'd be excellent. Thanks. |
use Released on |
there's one thing to notice, on v2.4.4 I move the css files from css to dist folder, remember to update the css path. I apologize for it. |
Container style, all the other styles... need to let custom css module style names go in there in place of style objects. Also, the main component should accept standard Bootstrap 'className' prop.
The text was updated successfully, but these errors were encountered: