🐛 Bug Report
When trying to setup a custom color and theme mode with FluentDesignTheme component I noticed that my settings are not applied in menus, dropdowns of selects and switches. After a long investigation the problem was localized in me using a cache breaker for loading the Microsoft.FluentUI.AspNetCore.Components.lib.module.js. My guess is that this caused the module not to be found by the Menu Provider and initialized again with the default theme and color settings.
The problem disappears after the cache breaker is removed
💻 Repro or Code Sample
Example Github repo
Check the App.razor, you can comment and uncomment where pointed out to simulate the effect.
🤔 Expected Behavior
The set theme mode and customer color to be applied globally
😯 Current Behavior
In the :host scope of the menu shadow dome, the mode and accent colors are inited with their default values, not with the ones set by the FluentDesignTheme component. In the rest of the application the customization is applied correctly
💁 Possible Solution
Check and fix the matching algorythm for discovering whether the *.module.js is loaded or not
🌍 Your Environment
- .NET 9 and Fluent UI Blazor library Version [4.12.1]