component rendering optimizations

This commit is contained in:
sbwalker
2024-01-04 13:47:51 -05:00
parent d35ef2d360
commit f75179b2f6
7 changed files with 61 additions and 44 deletions

View File

@ -15,17 +15,20 @@
}
@code {
private string content = "";
private string content = "";
protected override async Task OnParametersSetAsync()
{
try
protected override async Task OnParametersSetAsync()
{
try
{
var htmltext = await HtmlTextService.GetHtmlTextAsync(ModuleState.ModuleId);
if (htmltext != null)
if (PageState.RenderModuleInstance(ModuleState))
{
content = htmltext.Content;
content = Utilities.FormatContent(content, PageState.Alias, "render");
var htmltext = await HtmlTextService.GetHtmlTextAsync(ModuleState.ModuleId);
if (htmltext != null)
{
content = htmltext.Content;
content = Utilities.FormatContent(content, PageState.Alias, "render");
}
}
}
catch (Exception ex)