From f6839f5a57f0d48434df5b5b02764b3672e4f406 Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Mon, 8 May 2023 07:08:45 -0400 Subject: [PATCH] Keep reflecting search matches after applying changes --- src/js/3p-filters.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/js/3p-filters.js b/src/js/3p-filters.js index c62e1ed90..7e60986ae 100644 --- a/src/js/3p-filters.js +++ b/src/js/3p-filters.js @@ -98,6 +98,9 @@ const renderFilterLists = ( ) => { if ( dom.cl.has(listEntryPrevious, 'toRemove') ) { dom.cl.add(listEntry, 'toRemove'); } + if ( dom.cl.has(listEntryPrevious, 'searchMatch') ) { + dom.cl.add(listEntry, 'searchMatch'); + } } else { dom.cl.toggle(listEntry, 'checked', listDetails.off !== true); } @@ -384,6 +387,9 @@ const updateListNode = listNode => { dom.text(qs$(listNode, '.nodestats'), renderNodeStats(listLeaves.length, qsa$(listNode, '.listEntry[data-role="leaf"]').length) ); + dom.cl.toggle(listNode, 'searchMatch', + qs$(listNode, ':scope > .listEntries > .listEntry.searchMatch') !== null + ); if ( listNode.dataset.parent === 'root' ) { return; } let usedFilterCount = 0; let totalFilterCount = 0;