I recently encountered an issue with my Blazor Server side project that involved integrating the Black Dashboard template from Creative Tim. Initially, my components, specifically the text fields, were functioning correctly with MudBlazor. However, upon adding the Black Dashboard template to the project, I faced some challenges.
Here's a snippet from my _Host.cshtml file:
@page "/"
@namespace PPJ_Internal_Website_BlazorServer.Pages
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
@{
Layout = null;
}
<!DOCTYPE html>
<html lang="en">
...
The main issue arose when I removed
<script src="_framework/blazor.server.js"></script>
. This action allowed my custom scripts to work as intended, enabling me to modify themes and sidebar backgrounds. However, it caused functionality issues with the MudBlazor text field component.
https://i.sstatic.net/xAzvf.png
Conversely, re-adding <script src="_framework/blazor.server.js"></script>
resolved the problems with the MudBlazor component but rendered my custom scripts ineffective, preventing me from altering sidebar styles or themes.
https://i.sstatic.net/CYbsh.png
In order to address this dilemma and ensure seamless integration of both the Black Dashboard template and MudBlazor components, it is essential to find a suitable solution that allows for the coexistence of these elements without compromising functionality. https://i.sstatic.net/NwFqs.gif
Any insights on resolving this compatibility challenge would be greatly appreciated.