AllenFang / AllenFang/react-bootstrap-table

sizePerPageDropDown not working in IE 11

未關閉
#1,567 14 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
JavaScript
星號
2.2k
分支
761
PR 合併指標
30 天內沒有已合併 PR

描述

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?

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。