diff --git a/.github/workflows/main-release-build.yml b/.github/workflows/main-release-build.yml
index a2defb41..60b16854 100644
--- a/.github/workflows/main-release-build.yml
+++ b/.github/workflows/main-release-build.yml
@@ -31,7 +31,7 @@ jobs:
./assetCopy.ps1
cd ../..
- name: Build Core
- run: dotnet build ./src/dymaptic.GeoBlazor.Core/dymaptic.GeoBlazor.Core.csproj --no-restore /p:OptOutFromCoreEsBuild=false /p:GenerateDocs=false /p:UpdateTemplates=false -c Release
+ run: dotnet build ./src/dymaptic.GeoBlazor.Core/dymaptic.GeoBlazor.Core.csproj --no-restore /p:OptOutFromCoreEsBuild=true /p:GenerateDocs=false /p:UpdateTemplates=false -c Release
- name: Install xmllint
shell: bash
run: |
diff --git a/Directory.Build.props b/Directory.Build.props
index 7043e61d..f75a251f 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -2,6 +2,6 @@
enable
enable
- 3.1.0
+ 3.1.1
\ No newline at end of file
diff --git a/src/dymaptic.GeoBlazor.Core/Scripts/arcGisJsInterop.ts b/src/dymaptic.GeoBlazor.Core/Scripts/arcGisJsInterop.ts
index 4b319db8..c2a65da4 100644
--- a/src/dymaptic.GeoBlazor.Core/Scripts/arcGisJsInterop.ts
+++ b/src/dymaptic.GeoBlazor.Core/Scripts/arcGisJsInterop.ts
@@ -2034,7 +2034,7 @@ async function createWidget(widget: any, viewId: string): Promise
});
newWidget = layerListWidget;
- if (hasValue(widget.hasCustomHandler)) {
+ if (hasValue(widget.hasCustomHandler) && widget.hasCustomHandler) {
layerListWidget.listItemCreatedFunction = async (evt) => {
let dotNetListItem = buildDotNetListItem(evt.item);
let returnItem = await widget.layerListWidgetObjectReference.invokeMethodAsync('OnListItemCreated', dotNetListItem) as DotNetListItem;
@@ -2051,7 +2051,7 @@ async function createWidget(widget: any, viewId: string): Promise
});
newWidget = basemapLayerListWidget;
- if (hasValue(widget.hasCustomBaseListHandler)) {
+ if (hasValue(widget.hasCustomBaseListHandler) && widget.hasCustomBaseListHandler) {
basemapLayerListWidget.baseListItemCreatedFunction = async (evt) => {
let dotNetBaseListItem = buildDotNetListItem(evt.item);
let returnItem = await widget.baseLayerListWidgetObjectReference.invokeMethodAsync('OnBaseListItemCreated', dotNetBaseListItem) as DotNetListItem;
@@ -2060,7 +2060,7 @@ async function createWidget(widget: any, viewId: string): Promise
}
};
}
- if (hasValue(widget.hasCustomReferenceListHandler)) {
+ if (hasValue(widget.hasCustomReferenceListHandler) && widget.hasCustomReferenceListHandler) {
basemapLayerListWidget.baseListItemCreatedFunction = async (evt) => {
let dotNetReferenceListItem = buildDotNetListItem(evt.item);
let returnItem = await widget.baseLayerListWidgetObjectReference.invokeMethodAsync('OnReferenceListItemCreated', dotNetReferenceListItem) as DotNetListItem;
diff --git a/templates/content/dymaptic.GeoBlazor.Template.Maui/dymaptic.GeoBlazor.Template.Maui.csproj b/templates/content/dymaptic.GeoBlazor.Template.Maui/dymaptic.GeoBlazor.Template.Maui.csproj
index 6a6a12a8..b7964502 100644
--- a/templates/content/dymaptic.GeoBlazor.Template.Maui/dymaptic.GeoBlazor.Template.Maui.csproj
+++ b/templates/content/dymaptic.GeoBlazor.Template.Maui/dymaptic.GeoBlazor.Template.Maui.csproj
@@ -81,7 +81,7 @@
-
+
diff --git a/templates/content/dymaptic.GeoBlazor.Template.Server/dymaptic.GeoBlazor.Template.Server.csproj b/templates/content/dymaptic.GeoBlazor.Template.Server/dymaptic.GeoBlazor.Template.Server.csproj
index 1889a8b8..858016f3 100644
--- a/templates/content/dymaptic.GeoBlazor.Template.Server/dymaptic.GeoBlazor.Template.Server.csproj
+++ b/templates/content/dymaptic.GeoBlazor.Template.Server/dymaptic.GeoBlazor.Template.Server.csproj
@@ -7,7 +7,7 @@
-
+
diff --git a/templates/content/dymaptic.GeoBlazor.Template.WebApp/dymaptic.GeoBlazor.Template.WebApp.Client/dymaptic.GeoBlazor.Template.WebApp.Client.csproj b/templates/content/dymaptic.GeoBlazor.Template.WebApp/dymaptic.GeoBlazor.Template.WebApp.Client/dymaptic.GeoBlazor.Template.WebApp.Client.csproj
index ccef3e85..69b6a591 100644
--- a/templates/content/dymaptic.GeoBlazor.Template.WebApp/dymaptic.GeoBlazor.Template.WebApp.Client/dymaptic.GeoBlazor.Template.WebApp.Client.csproj
+++ b/templates/content/dymaptic.GeoBlazor.Template.WebApp/dymaptic.GeoBlazor.Template.WebApp.Client/dymaptic.GeoBlazor.Template.WebApp.Client.csproj
@@ -9,7 +9,7 @@
-
+
diff --git a/templates/content/dymaptic.GeoBlazor.Template.WebApp/dymaptic.GeoBlazor.Template.WebApp/dymaptic.GeoBlazor.Template.WebApp.csproj b/templates/content/dymaptic.GeoBlazor.Template.WebApp/dymaptic.GeoBlazor.Template.WebApp/dymaptic.GeoBlazor.Template.WebApp.csproj
index b3054d70..452488f3 100644
--- a/templates/content/dymaptic.GeoBlazor.Template.WebApp/dymaptic.GeoBlazor.Template.WebApp/dymaptic.GeoBlazor.Template.WebApp.csproj
+++ b/templates/content/dymaptic.GeoBlazor.Template.WebApp/dymaptic.GeoBlazor.Template.WebApp/dymaptic.GeoBlazor.Template.WebApp.csproj
@@ -8,7 +8,7 @@
-
+
diff --git a/templates/content/dymaptic.GeoBlazor.Template.WebAssembly/dymaptic.GeoBlazor.Template.WebAssembly.csproj b/templates/content/dymaptic.GeoBlazor.Template.WebAssembly/dymaptic.GeoBlazor.Template.WebAssembly.csproj
index d70e1515..12a64d4f 100644
--- a/templates/content/dymaptic.GeoBlazor.Template.WebAssembly/dymaptic.GeoBlazor.Template.WebAssembly.csproj
+++ b/templates/content/dymaptic.GeoBlazor.Template.WebAssembly/dymaptic.GeoBlazor.Template.WebAssembly.csproj
@@ -7,7 +7,7 @@
-
+
diff --git a/templates/dymaptic.GeoBlazor.Templates.csproj b/templates/dymaptic.GeoBlazor.Templates.csproj
index cc511e70..9f5701af 100644
--- a/templates/dymaptic.GeoBlazor.Templates.csproj
+++ b/templates/dymaptic.GeoBlazor.Templates.csproj
@@ -3,7 +3,7 @@
dymaptic.GeoBlazor.Templates
GeoBlazor Project Templates
- 3.1.0
+ 3.1.1
2.5.2
MIT
dymaptic
diff --git a/test/dymaptic.GeoBlazor.Core.Test.Blazor.Shared/Components/WidgetTests.razor b/test/dymaptic.GeoBlazor.Core.Test.Blazor.Shared/Components/WidgetTests.razor
index 9c4bf446..e2fc946a 100644
--- a/test/dymaptic.GeoBlazor.Core.Test.Blazor.Shared/Components/WidgetTests.razor
+++ b/test/dymaptic.GeoBlazor.Core.Test.Blazor.Shared/Components/WidgetTests.razor
@@ -55,6 +55,30 @@
Assert.IsTrue(handlerWasCalled);
}
+ [TestMethod]
+ public async Task TestCanRenderBasemapLayerListWidgetWithoutHandler(Action renderHandler)
+ {
+ AddMapRenderFragment(
+ @
+
+
+
+
+ );
+
+ await WaitForMapToRender();
+ await AssertJavaScript("assertWidgetExists", args: "esri.widgets.BasemapLayerList");
+ }
+
[TestMethod]
public async Task TestBasemapToggleFailsWithoutNextBasemap(Action renderHandler)
{