-
Notifications
You must be signed in to change notification settings - Fork 431
Closed
Description
When I use ToolkitProvider, table styling does not work at all. I specified "striped" and "bordered", but it doesn't work. I tried applying my own custom rowStyle as well, but it doesn't work. It's as if the CSS doesn't exist. Search bar styling does not work either. Here is my code:
import React, { Component } from 'react'
import 'react-bootstrap-table-next/dist/react-bootstrap-table2.min.css'
import 'react-bootstrap-table2-toolkit/dist/react-bootstrap-table2-toolkit.min.css'
import dataArr from './data/dataArr'
import ToolkitProvider, { Search } from 'react-bootstrap-table2-toolkit'
import BootstrapTable from 'react-bootstrap-table-next'
import paginationFactory from 'react-bootstrap-table2-paginator'
class IndexTable extends Component {
constructor (props) {
super(props)
this.state = {
data: dataArr
}
this.formatImage = this.formatImage.bind(this)
}
...
...
...
render () {
const { SearchBar } = Search
const columns = [ ....... ]
...
...
return (
<div>
<ToolkitProvider
keyField="id"
data={this.state.data}
columns={columns}
bootstrap4
striped
bordered
search
>
{
props => (
<div>
<SearchBar {...props.searchProps}
placeholder="Search..."
/>
<hr />
<BootstrapTable pagination={paginationFactory()} { ...props.baseProps } />
<br />
</div>
)
}
</ToolkitProvider>
</div>
)
}
}
I'm running versions:
react-bootstrap-table-next: 1.4.1
react-bootstrap-table2-paginator: 1.0.4
react-bootstrap-table2-toolkit: 1.1.1
Thank you!
Metadata
Metadata
Assignees
Labels
No labels