File tree Expand file tree Collapse file tree 1 file changed +6
-17
lines changed
src/webviews/apps/plus/focus/components Expand file tree Collapse file tree 1 file changed +6
-17
lines changed Original file line number Diff line number Diff line change @@ -365,24 +365,13 @@ export class GlFocusApp extends LitElement {
365365 this . searchText = value ;
366366 }
367367
368- async onShowMenu ( ) {
369- const menuEl : Popover | null = document . querySelector ( 'gk-popover' ) ;
370- if ( menuEl ) {
371- await menuEl . showPopover ( ) ;
372- }
373- }
374-
375- onHideMenu ( ) {
376- const menuEl : Popover | null = document . querySelector ( 'gk-popover' ) ;
377- if ( menuEl ) {
378- menuEl . hidePopover ( ) ;
379- }
380- }
381-
382368 onSelectMineFilter ( e : CustomEvent < { target : MenuItem } > ) {
383- if ( e . detail ?. target ?. dataset ?. value != null ) {
384- this . selectedMineFilter = e . detail . target . dataset . value ;
385- this . onHideMenu ( ) ;
369+ const target = e . detail ?. target ;
370+ if ( target ?. dataset ?. value != null ) {
371+ this . selectedMineFilter = target . dataset . value ;
372+
373+ const menuEl : Popover | null = target . closest ( 'gk-popover' ) ;
374+ menuEl ?. hidePopover ( ) ;
386375 }
387376 }
388377
You can’t perform that action at this time.
0 commit comments