Closed
Description
I want to make a inputlayout for all my paramters on my hero-object. i start with the name of the instance of my hero-object.
In first Line the normal Inputfield. It works, in second line, the Inputfield-Component, that don't work.
<input type="text" bind-value-oninput="@hero.Name" />
<InputField Label="Name" bind-Value="@hero.Name"></InputField>
inputfield.csthml
<div class="form-group @(Orientation == InputFieldOrientation.Horizontal ? "row" : "")">
<label class="col-sm-2 col-form-label">@Label</label>
<div class="col-sm-10 @(Orientation == InputFieldOrientation.Horizontal ? "text-center" : "")">
<input class="form-control form-control-dark w-100" type="text" placeholder="@Label" bind-value-oninput="@Value" /> </div>
</div>
@functions {
[Parameter] private string Label { get; set; }
[Parameter] private string Value { get; set; }
[Parameter] private Action<string> ValueChanged { get; set; }
[Parameter] private InputFieldOrientation Orientation { get; set; } = InputFieldOrientation.Horizontal;
}