ATL-936: Fixed the theme dropdown in the settings.

Signed-off-by: Akos Kitta <kittaakos@typefox.io>
This commit is contained in:
Akos Kitta 2021-02-08 15:29:41 +01:00 committed by Akos Kitta
parent 01ef138d9a
commit 19613de1b4

View File

@ -300,7 +300,7 @@ export class SettingsComponent extends React.Component<SettingsComponent.Props,
<div className='flex-line'>
<select
className='theia-select'
value={ThemeService.get().getCurrentTheme().label}
value={ThemeService.get().getThemes().find(({ id }) => id === this.state.themeId)?.label || 'Unknown'}
onChange={this.themeDidChange}>
{ThemeService.get().getThemes().map(({ id, label }) => <option key={id} value={label}>{label}</option>)}
</select>