-
Hi community, I have a question. I have two numeric fields (field1, field2).
In the class I have this
But I did't see any result. Blazorise version: 0.9.3-preview6 Thx in Advanced! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Try this: <NumericEdit TValue="decimal" Value="@Field1" ValueChanged="@OnField1Changed" />
<NumericEdit TValue="decimal" Value="@Field2" ReadOnly="true" />
@code{
decimal Field1;
decimal Field2;
Task OnField1Changed( decimal newValue )
{
Field1 = newValue;
Field2 = Field1 * 0.25m;
return Task.CompletedTask;
}
} I think you only missed Also, you don't need |
Beta Was this translation helpful? Give feedback.
Try this:
I think you only missed
Task
on the methodOnField1Changed
. It must be available so that Blazor can update the tree.Also, you don't need
@bind-
for the readonly field.