File tree 4 files changed +18
-12
lines changed
4 files changed +18
-12
lines changed Original file line number Diff line number Diff line change 1
1
{{> include " ./Popup.hbs" }}
2
2
3
3
{{ #*inline " beforeContent" }}
4
- <header
5
- class =" ui5-popup-header-root"
6
- id =" ui5-popup-header"
7
- @mousedown =" {{ _onDragMouseDown }} " >
8
- {{ #if header.length }}
9
- <slot name =" header" ></slot >
10
- {{ else }}
11
- <h2 class =" ui5-popup-header-text" >{{ headerText }} </h2 >
12
- {{ /if }}
13
- </header >
4
+ {{ #if _displayHeader }}
5
+ <header
6
+ class =" ui5-popup-header-root"
7
+ id =" ui5-popup-header"
8
+ @mousedown =" {{ _onDragMouseDown }} " >
9
+ {{ #if header.length }}
10
+ <slot name =" header" ></slot >
11
+ {{ else }}
12
+ <h2 class =" ui5-popup-header-text" >{{ headerText }} </h2 >
13
+ {{ /if }}
14
+ </header >
15
+ {{ /if }}
14
16
{{ /inline }}
15
17
16
18
{{ #*inline " afterContent" }}
Original file line number Diff line number Diff line change @@ -203,6 +203,10 @@ class Dialog extends Popup {
203
203
return "flex" ;
204
204
}
205
205
206
+ get _displayHeader ( ) {
207
+ return this . header . length || this . headerText ;
208
+ }
209
+
206
210
show ( ) {
207
211
super . show ( ) ;
208
212
this . _center ( ) ;
Original file line number Diff line number Diff line change @@ -659,7 +659,7 @@ class Popover extends Popup {
659
659
* Hook for descendants to hide header.
660
660
*/
661
661
get _displayHeader ( ) {
662
- return true ;
662
+ return this . header . length || this . headerText ;
663
663
}
664
664
665
665
/**
Original file line number Diff line number Diff line change @@ -163,7 +163,7 @@ class ResponsivePopover extends Popover {
163
163
}
164
164
165
165
get _displayHeader ( ) {
166
- return this . _isPhone || ! this . contentOnlyOnDesktop ;
166
+ return ( this . _isPhone || ! this . contentOnlyOnDesktop ) && super . _displayHeader ;
167
167
}
168
168
169
169
get _displayFooter ( ) {
You can’t perform that action at this time.
0 commit comments