improved dynamic CSS handling
This commit is contained in:
@ -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/");
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user