mirror of
https://github.com/vector-im/element-web.git
synced 2025-12-16 14:51:56 +01:00
Merge pull request #780 from matrix-org/dbkr/country_dropdown_setstate_warning
Remove React warning
This commit is contained in:
commit
27c945c544
@ -43,8 +43,10 @@ export default class CountryDropdown extends React.Component {
|
|||||||
this.state = {
|
this.state = {
|
||||||
searchQuery: '',
|
searchQuery: '',
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!props.value) {
|
componentWillMount() {
|
||||||
|
if (!this.props.value) {
|
||||||
// If no value is given, we start with the first
|
// If no value is given, we start with the first
|
||||||
// country selected, but our parent component
|
// country selected, but our parent component
|
||||||
// doesn't know this, therefore we do this.
|
// doesn't know this, therefore we do this.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user