File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -182,7 +182,7 @@ export class QuenchResults extends HandlebarsApplicationMixin(ApplicationV2)<Que
182182 * @internal
183183 * @param event - The click event
184184 */
185- static async _onExpander ( event : Event , target : HTMLElement ) {
185+ static async _onExpander ( this : QuenchResults , event : Event , target : HTMLElement ) {
186186 const expander = target ;
187187 if ( ! expander . matches ( ".expander" ) ) return ;
188188 event . preventDefault ( ) ;
@@ -298,8 +298,18 @@ export class QuenchResults extends HandlebarsApplicationMixin(ApplicationV2)<Que
298298 } ;
299299
300300 for ( const batchLi of html ?. children ?? [ ] ) {
301+ const batchLabel = batchLi . querySelector ( ".test-batch > label" ) ?. textContent ;
302+ const batchMatchesQuery = batchLabel
303+ ? rgx . test ( SearchFilter . cleanQuery ( batchLabel ) )
304+ : undefined ;
305+ let batchHasQuery = batchMatchesQuery || false ;
301306 for ( const element of batchLi . querySelector ( ".runnable-list" ) ?. children ?? [ ] ) {
302- checkElement ( element as HTMLElement ) ;
307+ batchHasQuery = checkElement ( element as HTMLElement , batchMatchesQuery ) || batchHasQuery ;
308+ }
309+ if ( ! batchHasQuery ) {
310+ batchLi . classList . add ( "disabled" , "filtered" ) ;
311+ } else {
312+ batchLi . classList . remove ( "disabled" , "filtered" ) ;
303313 }
304314 }
305315 }
You can’t perform that action at this time.
0 commit comments