From a845dd19762b5c982c9a02fe0790957729d98736 Mon Sep 17 00:00:00 2001 From: Leigh Pointer Date: Tue, 26 Nov 2024 15:39:51 +0100 Subject: [PATCH] Rework for Tabstrip regression issue Fix for Tabpanel is not updating the UI. #4778 #4828 --- .../Modules/Admin/Modules/Settings.razor | 5 +- Oqtane.Client/Modules/Admin/Pages/Add.razor | 3 + Oqtane.Client/Modules/Admin/Pages/Edit.razor | 3 - .../Modules/Controls/QuillJSTextEditor.razor | 2 +- Oqtane.Client/Modules/Controls/TabStrip.razor | 57 ++++++++++++------- 5 files changed, 41 insertions(+), 29 deletions(-) diff --git a/Oqtane.Client/Modules/Admin/Modules/Settings.razor b/Oqtane.Client/Modules/Admin/Modules/Settings.razor index adf686fb3..828d402e8 100644 --- a/Oqtane.Client/Modules/Admin/Modules/Settings.razor +++ b/Oqtane.Client/Modules/Admin/Modules/Settings.razor @@ -242,7 +242,6 @@ private async Task SaveModule() { - validated = true; var interop = new Interop(JSRuntime); if (await interop.FormValid(form)) @@ -302,13 +301,13 @@ } else { - //_activetab = "Settings"; + _activetab = "Settings"; AddModuleMessage(Localizer["Message.Required.Title"], MessageType.Warning); } } else { - //_activetab = "Settings"; + _activetab = "Settings"; AddModuleMessage(SharedLocalizer["Message.InfoRequired"], MessageType.Warning); } } diff --git a/Oqtane.Client/Modules/Admin/Pages/Add.razor b/Oqtane.Client/Modules/Admin/Pages/Add.razor index 57c2c5887..1f87ca935 100644 --- a/Oqtane.Client/Modules/Admin/Pages/Add.razor +++ b/Oqtane.Client/Modules/Admin/Pages/Add.razor @@ -469,6 +469,7 @@ } else { + _activetab = "Settings"; AddModuleMessage(Localizer["Message.Required.PageInfo"], MessageType.Warning); } @@ -476,11 +477,13 @@ catch (Exception ex) { await logger.LogError(ex, "Error Saving Page {Page} {Error}", page, ex.Message); + _activetab = "Settings"; AddModuleMessage(Localizer["Error.Page.Save"], MessageType.Error); } } else { + _activetab = "Settings"; AddModuleMessage(SharedLocalizer["Message.InfoRequired"], MessageType.Warning); } } diff --git a/Oqtane.Client/Modules/Admin/Pages/Edit.razor b/Oqtane.Client/Modules/Admin/Pages/Edit.razor index 79b7e8b7d..55a7e9858 100644 --- a/Oqtane.Client/Modules/Admin/Pages/Edit.razor +++ b/Oqtane.Client/Modules/Admin/Pages/Edit.razor @@ -673,7 +673,6 @@ else { _activetab = "Settings"; - _refresh = true; AddModuleMessage(Localizer["Message.Required.PageInfo"], MessageType.Warning); } } @@ -681,14 +680,12 @@ { await logger.LogError(ex, "Error Saving Page {Page} {Error}", _page, ex.Message); _activetab = "Settings"; - _refresh = true; AddModuleMessage(Localizer["Error.Page.Save"], MessageType.Error); } } else { _activetab = "Settings"; - _refresh = true; AddModuleMessage(SharedLocalizer["Message.InfoRequired"], MessageType.Warning); } } diff --git a/Oqtane.Client/Modules/Controls/QuillJSTextEditor.razor b/Oqtane.Client/Modules/Controls/QuillJSTextEditor.razor index 82bbb05f6..26bc244fb 100644 --- a/Oqtane.Client/Modules/Controls/QuillJSTextEditor.razor +++ b/Oqtane.Client/Modules/Controls/QuillJSTextEditor.razor @@ -7,7 +7,7 @@ @inject IStringLocalizer SharedLocalizer
- + @if (_allowRichText) { diff --git a/Oqtane.Client/Modules/Controls/TabStrip.razor b/Oqtane.Client/Modules/Controls/TabStrip.razor index e2a3c0f16..9f66b9ee4 100644 --- a/Oqtane.Client/Modules/Controls/TabStrip.razor +++ b/Oqtane.Client/Modules/Controls/TabStrip.razor @@ -10,13 +10,13 @@