1
我正在使用react-bootstrap和ReactJS。我期待選擇選項作爲參數,但沒有看到填充選項的方式。這是迄今爲止的代碼。我如何傳遞數據react-bootstrap添加選項以選擇 - ReactJS
render() {
return (
<div>
<Button bsStyle="primary" onClick={this.open}>Add Parameter</Button>
<Modal show={this.state.showModal} onHide={this.close}>
<Modal.Header>
<Modal.Title>Add/Edit Parameter</Modal.Title>
</Modal.Header>
<Modal.Body>
<form>
<FormGroup controlId="parameterType">
<ControlLabel>Type</ControlLabel>
<FormControl componentClass="select" placeholder="Type">
<option value="select">select</option>
<option value="other">...</option>
</FormControl>
</FormGroup>
</form>
</Modal.Body>
<Modal.Footer>
<Button bsStyle="primary" onClick={this.close}>Save Changes</Button>
</Modal.Footer>
</Modal>
</div>
)
}