From bd9a53f550cc72cf87fce8e99a5b61661dcfc8a5 Mon Sep 17 00:00:00 2001 From: Florian Gilde Date: Tue, 6 Aug 2024 08:50:34 +0200 Subject: [PATCH] Update to MudBlazor 7.5.0 --- .../MudBlazor.Extensions.Tests.csproj | 12 ++++++------ .../Components/TreeView/MudExTreeView.razor.cs | 12 ++++++------ MudBlazor.Extensions/Docs/CHANGELOG.md | 2 ++ MudBlazor.Extensions/MudBlazor.Extensions.csproj | 10 +++++----- .../MainSample.WebAssembly.csproj | 6 +++--- .../MainSample.WebAssembly/Shared/NavMenu.razor.cs | 7 ++++++- Samples/MainSample.WebAssembly/wwwroot/index.html | 2 +- TryMudEx/Try.Core/Try.Core.csproj | 6 +++--- TryMudEx/Try.Tests/Try.Tests.csproj | 4 ++-- TryMudEx/TryMudEx.Client/TryMudEx.Client.csproj | 4 ++-- TryMudEx/TryMudEx.Server/TryMudEx.Server.csproj | 4 ++-- 11 files changed, 38 insertions(+), 31 deletions(-) diff --git a/MudBlazor.Extensions.Tests/MudBlazor.Extensions.Tests.csproj b/MudBlazor.Extensions.Tests/MudBlazor.Extensions.Tests.csproj index e00ffb5b..ac3dde7b 100644 --- a/MudBlazor.Extensions.Tests/MudBlazor.Extensions.Tests.csproj +++ b/MudBlazor.Extensions.Tests/MudBlazor.Extensions.Tests.csproj @@ -12,15 +12,15 @@ - - - - - + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive all - + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/MudBlazor.Extensions/Components/TreeView/MudExTreeView.razor.cs b/MudBlazor.Extensions/Components/TreeView/MudExTreeView.razor.cs index 05f4b702..2735c0f7 100644 --- a/MudBlazor.Extensions/Components/TreeView/MudExTreeView.razor.cs +++ b/MudBlazor.Extensions/Components/TreeView/MudExTreeView.razor.cs @@ -56,13 +56,13 @@ private IDictionary GetParameters() { var componentType = GetComponentForViewMode(); var res = ComponentRenderHelper.GetCompatibleParameters(this, componentType) - .Where(p => IsOverwritten(p.Key)).ToDictionary(); + .Where(p => IsOverwritten(p.Key)).ToDictionary(p => p.Key, p => p.Value); - if(!FiltersChanged.HasDelegate) - res = res.Where(p => p.Key != nameof(Filters)).ToDictionary(); + if (!FiltersChanged.HasDelegate) + res = res.Where(p => p.Key != nameof(Filters)).ToDictionary(p => p.Key, p => p.Value); if (!FilterChanged.HasDelegate) - res = res.Where(p => p.Key != nameof(Filter)).ToDictionary(); - + res = res.Where(p => p.Key != nameof(Filter)).ToDictionary(p => p.Key, p => p.Value); + foreach (var parameter in Parameters ?? new Dictionary()) { if (ComponentRenderHelper.IsValidParameter(componentType, parameter.Key, parameter.Value)) @@ -70,7 +70,7 @@ private IDictionary GetParameters() } res.AddOrUpdate(nameof(ToolBarContent), ToggleComponent().CombineWith(ToolBarContent)); - return res.ToDictionary(); + return res.ToDictionary(p => p.Key, p => p.Value); } private static RenderWithAttribute GetRenderWithAttribute(Enum val) diff --git a/MudBlazor.Extensions/Docs/CHANGELOG.md b/MudBlazor.Extensions/Docs/CHANGELOG.md index 7a9c2475..e8ef1982 100644 --- a/MudBlazor.Extensions/Docs/CHANGELOG.md +++ b/MudBlazor.Extensions/Docs/CHANGELOG.md @@ -1,4 +1,6 @@ ## Change Log + - 2.0.3 > Update MudBlazor to 7.5.0 + - 2.0.3 > Fix small bugs - 2.0.0 > Update MudBlazor to 7.0.0 - 2.0.0 > **_Breaking:_** Rename: Many properties and behavoirs as MudBlazor does. Se migration gide from MudBlazor 6 to 7 [here](https://github.com/MudBlazor/MudBlazor/issues/8447) - 1.7.89 > Fix bug that uploadable file is not updated in MudExObjectEditDialog diff --git a/MudBlazor.Extensions/MudBlazor.Extensions.csproj b/MudBlazor.Extensions/MudBlazor.Extensions.csproj index 6b9b287b..997774c4 100644 --- a/MudBlazor.Extensions/MudBlazor.Extensions.csproj +++ b/MudBlazor.Extensions/MudBlazor.Extensions.csproj @@ -24,7 +24,7 @@ 2 0 - 03 + 3 @@ -67,8 +67,8 @@ - - + + @@ -78,10 +78,10 @@ - + - + diff --git a/Samples/MainSample.WebAssembly/MainSample.WebAssembly.csproj b/Samples/MainSample.WebAssembly/MainSample.WebAssembly.csproj index 0d4511e2..dd215812 100644 --- a/Samples/MainSample.WebAssembly/MainSample.WebAssembly.csproj +++ b/Samples/MainSample.WebAssembly/MainSample.WebAssembly.csproj @@ -12,9 +12,9 @@ - - - + + + diff --git a/Samples/MainSample.WebAssembly/Shared/NavMenu.razor.cs b/Samples/MainSample.WebAssembly/Shared/NavMenu.razor.cs index f26f97f6..7e5aa59e 100644 --- a/Samples/MainSample.WebAssembly/Shared/NavMenu.razor.cs +++ b/Samples/MainSample.WebAssembly/Shared/NavMenu.razor.cs @@ -23,7 +23,12 @@ public NavigationEntry SelectedNavEntry _selectedNavEntry = value; if (HasAction(value)) { - NavigationManager.NavigateTo(value.Href); + try + { + NavigationManager.NavigateTo(value.Href); + } + catch + {} } } } diff --git a/Samples/MainSample.WebAssembly/wwwroot/index.html b/Samples/MainSample.WebAssembly/wwwroot/index.html index 0cab0069..153f82ab 100644 --- a/Samples/MainSample.WebAssembly/wwwroot/index.html +++ b/Samples/MainSample.WebAssembly/wwwroot/index.html @@ -54,7 +54,7 @@ --> - + diff --git a/TryMudEx/Try.Core/Try.Core.csproj b/TryMudEx/Try.Core/Try.Core.csproj index b2c8c668..15fb9fdf 100644 --- a/TryMudEx/Try.Core/Try.Core.csproj +++ b/TryMudEx/Try.Core/Try.Core.csproj @@ -5,12 +5,12 @@ - + - + - + diff --git a/TryMudEx/Try.Tests/Try.Tests.csproj b/TryMudEx/Try.Tests/Try.Tests.csproj index 3124de91..d67a5fdc 100644 --- a/TryMudEx/Try.Tests/Try.Tests.csproj +++ b/TryMudEx/Try.Tests/Try.Tests.csproj @@ -8,8 +8,8 @@ - - + + diff --git a/TryMudEx/TryMudEx.Client/TryMudEx.Client.csproj b/TryMudEx/TryMudEx.Client/TryMudEx.Client.csproj index dc52b9f4..b4d638d5 100644 --- a/TryMudEx/TryMudEx.Client/TryMudEx.Client.csproj +++ b/TryMudEx/TryMudEx.Client/TryMudEx.Client.csproj @@ -7,11 +7,11 @@ - + - + diff --git a/TryMudEx/TryMudEx.Server/TryMudEx.Server.csproj b/TryMudEx/TryMudEx.Server/TryMudEx.Server.csproj index 0afa3d13..cfaf273b 100644 --- a/TryMudEx/TryMudEx.Server/TryMudEx.Server.csproj +++ b/TryMudEx/TryMudEx.Server/TryMudEx.Server.csproj @@ -6,8 +6,8 @@ - - + +