From 5345a12aca89a90736a2a84dd2e7006d16d5d6c4 Mon Sep 17 00:00:00 2001 From: vnetonline Date: Sat, 15 Jul 2023 12:47:18 +1000 Subject: [PATCH] [ENHANCE] - Moved `SetImage()` before the OnSelect fires so that the Parent can retrieve the Image from `fileManager` rather then calling `FileService` to retrieve again --- Oqtane.Client/Modules/Controls/FileManager.razor | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Oqtane.Client/Modules/Controls/FileManager.razor b/Oqtane.Client/Modules/Controls/FileManager.razor index 6a1f4aa0..dc3f24b6 100644 --- a/Oqtane.Client/Modules/Controls/FileManager.razor +++ b/Oqtane.Client/Modules/Controls/FileManager.razor @@ -271,13 +271,10 @@ { _message = string.Empty; FileId = int.Parse((string)e.Value); - if (FileId != -1) - { - await OnSelect.InvokeAsync(FileId); - } - await SetImage(); + await OnSelect.InvokeAsync(FileId); StateHasChanged(); + } private async Task SetImage()