What Changed
In v24.2, we introduced a unified resource management system for our Blazor components. The DxResourceManager.RegisterScripts()
method is now used to register DevExpress client resources and/or custom scripts across all DevExpress Blazor components.
The introduction of a unified resource management system also standardized the script load order across components. In the Dashboard component, the load order of the DevExtreme and jQuery libraries has changed — DevExtreme is now loaded without jQuery integration. This change resulted in the following:
- jQuery plugins for DevExtreme components cannot be registered out-of-the-box.
- Event arguments of DevExtreme widgets now include native DOM nodes.
Reasons for Change
In v24.1 and earlier, DevExpress Blazor components used different instances of DevExtreme, Knockout, and jQuery scripts. As a result, there could be more than one instance of the same script on a single page. This would increase the page size and could lead to issues.
In v24.2, all DevExpress Blazor and DevExtreme components now use the same version of the DevExtreme script. Each page includes only one DevExtreme script. The script load order is now consistent across all DevExpress Blazor components.
For more information, refer to the following Breaking Change article: The mechanism of adding DevExtreme into Blazor applications has changed.
Impact on Existing Apps
This change affects your application if you used the DxDashboard
component with DevExtreme widgets.
You may get the following errors in the browser console:
- $element.get is not a function
- $(…).dxWidget is not a function
How to Update Existing Apps
To enable jQuery integration, register the jQuery script before DevExtreme as follows:
Razor@DxResourceManager.RegisterScripts((config) =>
{
config.Unregister(CommonResources.JQueryJS);
config.Register(new DxResource(CommonResources.JQueryJS.ResourcePath, 50));
})
For more information on script load order in DevExpress Blazor components, see the following help topic: DxResourceManager.