gpt4 book ai didi

javascript - React-bootstrap-table 的 onRowClick

转载 作者:行者123 更新时间:2023-12-03 13:29:10 26 4
gpt4 key购买 nike

尝试让 onRowClick 工作,但当我单击该行时没有任何反应。

    <BootstrapTable data={products} onRowClick={this.onClickHandler.bind(this)} striped={true} hover={true} pagination={true} search={true} searchPlaceholder="Search">
<TableHeaderColumn isKey={true} dataField="_id">Customer ID</TableHeaderColumn>
<TableHeaderColumn dataField="customername" >Customer Name</TableHeaderColumn>
<TableHeaderColumn dataField="address">Address</TableHeaderColumn>
<TableHeaderColumn dataField="city">City</TableHeaderColumn>
<TableHeaderColumn dataField="createdate">Last Order Date</TableHeaderColumn>
<TableHeaderColumn dataField="style">Style</TableHeaderColumn>
<TableHeaderColumn dataField="dimensions">Dimensions</TableHeaderColumn>
</BootstrapTable>

最佳答案

抱歉,刚刚才明白

必须设置选项

var options = {
onRowClick: function(row){
}
}

<BootstrapTable data={products} options={options} ...

关于javascript - React-bootstrap-table 的 onRowClick,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36881022/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com