improved dynamic CSS handling

This commit is contained in:
Shaun Walker
2019-09-20 09:52:40 -04:00
parent c3ff9ff12b
commit ddf7cdbec7
4 changed files with 45 additions and 0 deletions

View File

@ -1,6 +1,8 @@
@using Oqtane.Shared
@using Oqtane.Modules
@using Microsoft.JSInterop
@namespace Oqtane.Shared
@inject IJSRuntime jsRuntime
@DynamicComponent
@ -28,4 +30,12 @@
}
};
}
protected override async Task OnParametersSetAsync()
{
// remove any custom CSS
var interop = new Interop(jsRuntime);
await interop.RemoveCSS("Themes/");
await interop.RemoveCSS("Modules/");
}
}