AllenFang / AllenFang/react-bootstrap-table

sizePerPageDropDown not working in IE 11

Open
#1,567 14 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
2.2k
Forks
761
PR merge metrics
No merged PRs in 30d

Description

I am using react-bootstrap-table 4.0.1, IE 11.0.9600.18762, bootstrap 3.3.7.

When I use the sizePerPageDropDown option and create my own sizePerPageDropDown control, it works fine in Chrome, but for IE 11 it seems to ignore this option completely. My sizePerPageDropDown render function creates a drop down box with the values 10, 20, 30, 40, 50. I see this fine in Chrome. However, when rendering in IE it shows the default 10, 25, 30, 50 and doesn't render anything in my function for sizePerPageDropDown. My code is below:

renderSizePerPageDropDown(props) {
const sizes = [10, 20, 30, 40, 50]
const sizePerPageOptions = sizes.map(sizeItem => {sizeItem})
return (



Size Per Page:  
this.props.dispatch(doSomething(parseInt(event.target.value, 10)))}
style={{ display: "inline-block", width: "5em" }}
>
{sizePerPageOptions}



)
}

render() {
....

const options = {
sizePerPage: 20,
sizePerPageDropDown: this.renderSizePerPageDropDown,
}
const TableHeaderColumns =[an array of TableHeaderColumn]

return (
{ this.tableRef = tableRef }}
data={data}
options={options}
tableStyle={{ border: "none" }}
condensed
striped
pagination
>
{TableHeaderColumns}

)
}

Any idea why this doesn't work in IE 11?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.