fix: make Schemes <select> a fully state-controlled input (#4436)
This commit is contained in:
@@ -37,12 +37,12 @@ export default class Schemes extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
let { schemes } = this.props
|
let { schemes, currentScheme } = this.props
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<label htmlFor="schemes">
|
<label htmlFor="schemes">
|
||||||
<span className="schemes-title">Schemes</span>
|
<span className="schemes-title">Schemes</span>
|
||||||
<select onChange={ this.onChange }>
|
<select onChange={ this.onChange } value={currentScheme}>
|
||||||
{ schemes.valueSeq().map(
|
{ schemes.valueSeq().map(
|
||||||
( scheme ) => <option value={ scheme } key={ scheme }>{ scheme }</option>
|
( scheme ) => <option value={ scheme } key={ scheme }>{ scheme }</option>
|
||||||
).toArray()}
|
).toArray()}
|
||||||
|
|||||||
Reference in New Issue
Block a user