User-1619399849 posted
I am fairly new to Blazor, and was wondering what would be best practice when it comes to select drop-down fields. This doesn't feel right to me:
<InputSelect class="form-control" id="PWIO" @bind-Value="@newInjury.LAWIModel.PlaceWhereInjuryOccured" @onkeyup="@(() => {HideUnhideField("PlaceWhereInjuryOccured");})" @onclick="@(() => {HideUnhideField("PlaceWhereInjuryOccured");})">
<option value="">Select Mechanism of Injury...</option>
<option value="Overuse">Overuse</option>
<option value="Struck by or collision with another playeror object">Struck by or collision with another playeror object</option>
<option value="Collision with fixed object/equipment">Collision with fixed object/equipment </option>
<option value="fall/slip/trip/ stumble on same level">fall/ slip/trip/ stumble on same level</option>
<option value="Sudden or rapid acceleration and deceleration">Sudden or rapid acceleration and deceleration</option>
<option value="Jumping, including landing from jump">Jumping, including landing from jump</option>
<option value="Temperature related">Temperature related</option>
<option value="Other">Other</option>
<option value="Unknown">Unknown</option>
</InputSelect>
I was wondering if storing input data for select drop down fields in @code section of the page would be the most appropriate approach. I would appreciate any pointers or recommendations. Thank you