fix dropdown list UX behavior where there is a default option

This commit is contained in:
Shaun Walker
2021-04-01 17:58:59 -04:00
parent 58c84da9c9
commit af5f79d343
5 changed files with 15 additions and 64 deletions

View File

@ -31,18 +31,11 @@
<Label For="defaultTheme" HelpText="Select the default theme for the website" ResourceKey="DefaultTheme">Default Theme: </Label>
</td>
<td>
<select id="defaultTheme" class="form-control" @onchange="(e => ThemeChanged(e))">
<select id="defaultTheme" class="form-control" value="@_themetype" @onchange="(e => ThemeChanged(e))">
<option value="-">&lt;@Localizer["Select Theme"]&gt;</option>
@foreach (var theme in _themes)
{
if (theme.TypeName == _themetype)
{
<option value="@theme.TypeName" selected>@theme.Name</option>
}
else
{
<option value="@theme.TypeName">@theme.Name</option>
}
<option value="@theme.TypeName">@theme.Name</option>
}
</select>
</td>