fix DropDown

This commit is contained in:
frab1t 2019-05-08 17:07:18 +02:00
parent 3940a4818c
commit 6973288d32
2 changed files with 8 additions and 5 deletions

View File

@ -20,8 +20,8 @@ class DropDown extends Component {
<Input
name = "type"
type = "select"
value = { this.props.type }
onChange = { this.props.handleInputChange }
value = { this.props.value }
onChange = { this.props.onChange }
>
<option value="">---</option>
{ options }

View File

@ -25,8 +25,7 @@ class OpenTicket extends Component {
type: '',
subject: '',
message: '',
categories: [],
categoriesLoaded: false
categories: []
};
this.handleInputChange = this.handleInputChange.bind(this);
@ -188,7 +187,11 @@ class OpenTicket extends Component {
Type
</Label>
<DropDown options={this.state.categories} />
<DropDown
options={this.state.categories}
value={this.state.type}
onChange={this.handleInputChange}
/>
</FormGroup>
</Col>
</Row>