From ee9f5f43e1cf21253ffdc0a2a121e873b3b52674 Mon Sep 17 00:00:00 2001 From: JohHub Date: Fri, 7 Oct 2022 19:16:20 +0200 Subject: [PATCH] change behaviour after adding new collab --- Frontend/Pages/WSE/Components/CollabModal.razor | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Frontend/Pages/WSE/Components/CollabModal.razor b/Frontend/Pages/WSE/Components/CollabModal.razor index 695fb6d..e93369d 100644 --- a/Frontend/Pages/WSE/Components/CollabModal.razor +++ b/Frontend/Pages/WSE/Components/CollabModal.razor @@ -1,6 +1,6 @@ @using Models @using Models.DTO -@inject NavigationManager NavManager +@inject NavigationManager NavigationManager @inject HttpClient HttpClient @using System.Reactive.Subjects @using System.Reactive.Linq @@ -125,8 +125,8 @@ Rights = WseRights.EditData }); await HttpClient.PostAsJsonAsync($"wse/{WseId}/collaborators", _collaborators); - StateHasChanged(); - @* TODO when backend works, test whether to call StateHasChanged or close Modal and ensure consistent state between FE and BE lisis *@ + ModalBase.Close(); + NavigationManager.NavigateTo(NavigationManager.Uri); } private async Task RemoveCollabById(long userId) {