Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4839

MatBlazor MatSelect control the order of MatOptions

$
0
0

I have created the following code using MatBlazor MatSelect:

<MatSelect Outlined="true" Id="class-status" TValue="int" @bind-Value="@myStatus"><MatOption Value="1">In service</MatOption><MatOption Value="0">Out of service</MatOption></MatSelect>

But it keeps ordering it by the 'value' rather than the order I have coded it in. I even tried changing it to 'bool' instead of 'int' and still seemed to order false first.

How can I control the order it is displayed in and make 'In Service' the default selected?


Viewing all articles
Browse latest Browse all 4839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>