You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
883 B
42 lines
883 B
@inject IJSRuntime jsRuntime; |
|
|
|
@inject IBuildOrderService buildOrderService |
|
|
|
@implements IDisposable |
|
|
|
<FormLayoutComponent> |
|
<FormTextAreaComponent Label="JSON Data" |
|
Rows="14" |
|
Value="@buildOrderService.AsJson()"> |
|
</FormTextAreaComponent> |
|
</FormLayoutComponent> |
|
|
|
@code { |
|
|
|
protected override void OnInitialized() |
|
{ |
|
buildOrderService.Subscribe(StateHasChanged); |
|
} |
|
|
|
void IDisposable.Dispose() |
|
{ |
|
buildOrderService.Unsubscribe(StateHasChanged); |
|
} |
|
|
|
protected override bool ShouldRender() |
|
{ |
|
#if DEBUG |
|
jsRuntime.InvokeVoidAsync("console.time", "BuildOrderComponent"); |
|
#endif |
|
|
|
return true; |
|
} |
|
|
|
protected override void OnAfterRender(bool firstRender) |
|
{ |
|
#if DEBUG |
|
jsRuntime.InvokeVoidAsync("console.timeEnd", "BuildOrderComponent"); |
|
#endif |
|
} |
|
|
|
} |