-
I was playing with a dynamic form, and I have one field dependant on another. Is this a bug or working as design ? <fieldset class="form-group">
<label>
Platform
<InputSelect class="form-control" @bind-Value="ticket.Platform">
<option>iOS</option>
<option>Android</option>
<option>Steam</option>
</InputSelect>
</label>
</fieldset>
@if (ticket.Platform == "Steam")
{
<fieldset class="form-group">
<label>
OS
<InputSelect class="form-control" @bind-Value="ticket.OS">
<option>Windows</option>
<option>Mac OS</option>
<option>Linux</option>
</InputSelect>
</label>
</fieldset>
} |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I think my issue is about dealing with null select. This model represents more clearly the intent and also works with that HTML
|
Beta Was this translation helpful? Give feedback.
I think my issue is about dealing with null select.
Switching mental model from HTML form to C# Model made it clear.
This model represents more clearly the intent and also works with that HTML