47 lines
1.0 KiB
Plaintext
47 lines
1.0 KiB
Plaintext
@inject IJSRuntime jsRuntime;
|
|
|
|
@inject IBuildOrderService buildOrderService
|
|
|
|
@implements IDisposable
|
|
|
|
<FormLayoutComponent>
|
|
|
|
</FormLayoutComponent>
|
|
|
|
@code {
|
|
/**
|
|
// TODO: Make this more elegant, and useful. Also, it currently doesn't clear properly
|
|
<FormTextAreaComponent Label="JSON Data"
|
|
Rows="14"
|
|
Value="@buildOrderService.AsJson()">
|
|
</FormTextAreaComponent>
|
|
*/
|
|
|
|
protected override void OnInitialized()
|
|
{
|
|
base.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
|
|
}
|
|
|
|
} |