When you set an event callback for “SelectedIndexesChanged” the dropdown list doesn’t show the new selected entry.
See the example below:
@page “/dropdownlist-basic”
<style>
/* This is the CSS used in the demo */
smart-drop-down-list {
min-height: 35px;
height: auto;
width: 300px;
}
</style>
<Example Name=”DropDownList”>
<DropDownList SelectedIndexes=”selectedIndexes” SelectedIndexesChanged=”OnSelectedIndexChanged”>
<ListItem Value=”1″>Affogato</ListItem>
<ListItem Value=”2″>Americano</ListItem>
<ListItem Value=”3″>Bicerin</ListItem>
<ListItem Value=”4″>Breve</ListItem>
<ListItem Value=”5″>Cappuccino</ListItem>
<ListItem Value=”6″>Cafe Crema</ListItem>
<ListItem Value=”7″>Cafe Corretto</ListItem>
<ListItem Value=”8″>Cafe macchiato</ListItem>
<ListItem Value=”9″>Cafe mocha</ListItem>
<ListItem Value=”10″>Cortado</ListItem>
<ListItem Value=”11″>Cuban espresso</ListItem>
<ListItem Value=”12″>Espresso</ListItem>
<ListItem Value=”13″>Eiskaffee</ListItem>
<ListItem Value=”14″>Frappuccino</ListItem>
<ListItem Value=”15″>Galao</ListItem>
<ListItem Value=”16″>Greek frappe coffee</ListItem>
<ListItem Value=”17″>Iced Coffee</ListItem>
<ListItem Value=”18″>Instant Coffee</ListItem>
<ListItem Value=”19″>Latte</ListItem>
<ListItem Value=”20″>Liqueur coffee</ListItem>
</DropDownList>
</Example>
@code {
private int[] selectedIndexes = new int[] { 0 };
private void OnSelectedIndexChanged(int[] selectedIndexes)
{
}
}