我有什么:
<div className="col-md-2">
<label>Status</label>
<select className="selectpicker" multiple title="Choose one of the following...">
<option>OK</option>
<option>PENDING</option>
<option>NEW</option>
</select>
</div>
问题:
值(OK,PENDING,NEW)在另一个滚动字段中单独显示。而下拉选择字段显示为旁边的单独字段。下拉选择字段内部没有值。附上截图。
我想要的是这种下拉菜单:(取自Bootstrap-select documentation)
我项目的技术堆栈:
这可能是兼容性问题吗?
修改
我放弃了。我不得不选择使用bootstrap-multiselect。它更不容易混淆。推荐它!
答案 0 :(得分:0)
is this what you are looking for??
<div className="col-md-2">
<label>Status</label>
<select className="selectpicker">
<option selected="selected">Choose one of the following</option>
<option>OK</option>
<option>PENDING</option>
<option>NEW</option>
</select>
</div>
答案 1 :(得分:0)
<SideBar onRest={this.changeToRest} test="12" />
1.Here you can pass the test="12" as a props
2.You can get the props at the sidebar component {this.props.test} like that