I am fairly new to Blazor, and I am trying to pass information from one input to next based on click event.
For example, I have the following select element:
<select @onchange="(e => DoStuff(e.Value.ToString()))">
@foreach (var item in Items)
{
<option value="@item.Id"> @item.Name </option>
}
</select>
</div>
<div class="d-none d-sm-block col-2">
<input type="number" @bind-value="ItemQuantity"/>
</div>
The idea is when a use clicks on on a selected item, I would like to send and capture that information in the next input (i.e., display Item.Price)
Currently, I am stuck on:
private void DoStuff(string e)
{
isItemSelected = 1;
var Selected = e;
}
I can't seem to display or use e for some reason. Item is on object that contains Name and Price and I would like to display the price on the second input.