Fix jumpy ui when changing language
Closes 7070 Spinner at wrong location when changing language
This commit is contained in:
parent
c2a2068926
commit
40ed8059b7
1 changed files with 15 additions and 13 deletions
|
@ -35,20 +35,22 @@ function SettingLanguage(props: Props) {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<React.Fragment>
|
<React.Fragment>
|
||||||
{previousLanguage && <Spinner type="small" />}
|
{!previousLanguage && (
|
||||||
|
<FormField
|
||||||
|
name="language_select"
|
||||||
|
type="select"
|
||||||
|
onChange={onLanguageChange}
|
||||||
|
value={language || getDefaultLanguage()}
|
||||||
|
>
|
||||||
|
{sortLanguageMap(SUPPORTED_LANGUAGES).map(([langKey, langName]) => (
|
||||||
|
<option key={langKey} value={langKey}>
|
||||||
|
{langName}
|
||||||
|
</option>
|
||||||
|
))}
|
||||||
|
</FormField>
|
||||||
|
)}
|
||||||
|
|
||||||
<FormField
|
{previousLanguage && <Spinner type="small" />}
|
||||||
name="language_select"
|
|
||||||
type="select"
|
|
||||||
onChange={onLanguageChange}
|
|
||||||
value={language || getDefaultLanguage()}
|
|
||||||
>
|
|
||||||
{sortLanguageMap(SUPPORTED_LANGUAGES).map(([langKey, langName]) => (
|
|
||||||
<option key={langKey} value={langKey}>
|
|
||||||
{langName}
|
|
||||||
</option>
|
|
||||||
))}
|
|
||||||
</FormField>
|
|
||||||
</React.Fragment>
|
</React.Fragment>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue