Я хочу установить maxHeight моей bootstrap таблицы.
Я пробовал приведенную ниже логику, но ничего не работает для моей таблицы.
//1st try
componentDidMount() {
let height = 100;
this.setState({tableHeight: height + "px"});
}
<BootstrapTable style={{color: this.state.colorCr }}
data={this.state.crArray}
headers={this.props.state.options.headers}
columns={crCol}
maxHeight={this.state.tableHeight}
>
</BootstrapTable>
//2nd try
<BootstrapTable style={{color: this.state.colorCr }}
data={this.state.crArray}
headers={this.props.state.options.headers}
columns={crCol}
height={100}
>
</BootstrapTable>
//3rd try
<BootstrapTable style={{color: this.state.colorCr }}
data={this.state.crArray}
headers={this.props.state.options.headers}
columns={crCol}
bodyStyle={ { maxHeight: '100px' } }
>
</BootstrapTable>
Может кто-нибудь сказать, пожалуйста мне, что я делаю неправильно, или любой другой способ установить максимальную высоту Bootstrap
таблицы. Любая помощь будет очень оценена.