File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
web_src/js/modules/fomantic Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -72,10 +72,10 @@ function updateSelectionLabel(label: HTMLElement) {
72
72
}
73
73
74
74
function onAfterFiltered ( this : any ) {
75
- const $dropdown = $ ( this ) ;
75
+ const $dropdown = $ ( this ) . closest ( '.ui.dropdown' ) ; // "this" can be the "ui dropdown" or "<select>"
76
76
const hideEmptyDividers = $dropdown . dropdown ( 'setting' , 'hideDividers' ) === 'empty' ;
77
77
const itemsMenu = $dropdown [ 0 ] . querySelector ( '.scrolling.menu' ) || $dropdown [ 0 ] . querySelector ( '.menu' ) ;
78
- if ( hideEmptyDividers ) hideScopedEmptyDividers ( itemsMenu ) ;
78
+ if ( hideEmptyDividers && itemsMenu ) hideScopedEmptyDividers ( itemsMenu ) ;
79
79
}
80
80
81
81
// delegate the dropdown's template functions and callback functions to add aria attributes.
You can’t perform that action at this time.
0 commit comments