@CurrReq.Key @* *@ @if (Mode == TimeEstim.SetMode.Balance) { }
@code { public record PercRequest(string Key, double Value); [Parameter] public PercRequest CurrReq { get; set; } = null!; [Parameter] public TimeEstim.SetMode Mode { get; set; } = TimeEstim.SetMode.None; private string FormattedValue{ get { double ans = CurrReq.Value * 100; return ans.ToString("F0", System.Globalization.CultureInfo.InvariantCulture) ?? "0"; } } /// /// Event for update /// [Parameter] public EventCallback EC_Updated { get; set; } private async Task SetPerc(decimal reqValue) { CurrReq = CurrReq with { Value = (double)reqValue }; await EC_Updated.InvokeAsync(CurrReq); } }