I realise that this might a niche issue with the specific 3rd party libraries I'm using, but thought I'd mention this incase anyone else runs into this.
When running my Blazor Server application I'm running into the following exception.
blazor.server.js:1 [2023-07-30T18:56:34.846Z] Error: Microsoft.JSInterop.JSException: window.Split is not a function
TypeError: window.Split is not a function
at Module.initSplitGrid (https://localhost:7218/_content/BlazorSplitGrid/splitGridInterop.js:49:26)
at https://localhost:7218/_framework/blazor.server.js:1:3506
at new Promise (<anonymous>)
at Ft.beginInvokeJSFromDotNet (https://localhost:7218/_framework/blazor.server.js:1:3480)
at Ft._invokeClientMethod (https://localhost:7218/_framework/blazor.server.js:1:75072)
at Ft._processIncomingData (https://localhost:7218/_framework/blazor.server.js:1:72696)
at Ft.connection.onreceive (https://localhost:7218/_framework/blazor.server.js:1:67009)
at i.onmessage (https://localhost:7218/_framework/blazor.server.js:1:51322)
at Microsoft.JSInterop.JSRuntime.InvokeAsync[TValue](Int64 targetInstanceId, String identifier, Object[] args)
at BlazorSplitGrid.Interop.SplitGridInterop.Initialise(IEnumerable`1 rowGutters, IEnumerable`1 columnGutters, SplitGridOptions options)
at BlazorSplitGrid.Elements.Grid.Initialise(ISplitGridInterop splitGridInterop)
at BlazorSplitGrid.SplitGrid.Initialise()
at BlazorSplitGrid.SplitGrid.OnAfterRenderAsync(Boolean firstRender)
at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)
Based on a bit of fiddling, I realised that split-grid.min.js containing the above Split method wasn't being correctly imported. This required an additional line to be inserted into the Host.cshtml file to fix the issue.
May be worth noting in the readme that you may need to do this if using BlazorSplitGrid within an existing application.
Update: I've isolated the issue - it seems that the issue occurs when used in conjunction with the BlazorMonaco library which has it's own requirements to add script imports into the Host.cshtml!
I realise that this might a niche issue with the specific 3rd party libraries I'm using, but thought I'd mention this incase anyone else runs into this.
When running my Blazor Server application I'm running into the following exception.
Based on a bit of fiddling, I realised that
split-grid.min.js
containing the above Split method wasn't being correctly imported. This required an additional line to be inserted into the Host.cshtml file to fix the issue.May be worth noting in the readme that you may need to do this if using BlazorSplitGrid within an existing application.
Update: I've isolated the issue - it seems that the issue occurs when used in conjunction with the BlazorMonaco library which has it's own requirements to add script imports into the Host.cshtml!