From 914530a10614d69b6685e59b6f63d26849841f33 Mon Sep 17 00:00:00 2001 From: Nate Bross Date: Mon, 26 Aug 2024 22:34:43 -0500 Subject: [PATCH] fix(ui): search resets on list changes --- ViewModels/MainWindowViewModel.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ViewModels/MainWindowViewModel.cs b/ViewModels/MainWindowViewModel.cs index 65e6abc..d4703b7 100644 --- a/ViewModels/MainWindowViewModel.cs +++ b/ViewModels/MainWindowViewModel.cs @@ -37,6 +37,13 @@ public MainWindowViewModel(ILogger logger) ); FileMakerClips = []; + FileMakerClips.CollectionChanged += (sender, e) => + { + // reset search text, which will trigger a property notify changed + // that will re-run the search with empty value (which shows all) + SearchText = string.Empty; + }; + FilteredClips = []; LoadClips(CurrentPath);