File tree 1 file changed +7
-2
lines changed
1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -548,6 +548,7 @@ class UI5Element extends HTMLElement {
548
548
549
549
if ( this . _shouldUpdateFragment ( ) ) {
550
550
this . staticAreaItem . _updateFragment ( this ) ;
551
+ this . staticAreaItemDomRef = this . staticAreaItem . staticAreaItemDomRef . shadowRoot ;
551
552
}
552
553
553
554
// Safari requires that children get the slot attribute only after the slot tags have been rendered in the shadow DOM
@@ -638,12 +639,16 @@ class UI5Element extends HTMLElement {
638
639
}
639
640
640
641
/**
641
- * Use this method in order to get a reference to element in the shadow root of a web component
642
+ * Use this method in order to get a reference to an element in the shadow root of the web component or the static area item of the component
642
643
* @public
644
+ * @method
643
645
* @param {String } refName Defines the name of the stable DOM ref
644
646
*/
645
647
getStableDomRef ( refName ) {
646
- return this . getDomRef ( ) . querySelector ( `[data-ui5-stable=${ refName } ]` ) ;
648
+ const staticAreaResult = this . staticAreaItemDomRef && this . staticAreaItemDomRef . querySelector ( `[data-ui5-stable=${ refName } ]` ) ;
649
+
650
+ return staticAreaResult
651
+ || this . getDomRef ( ) . querySelector ( `[data-ui5-stable=${ refName } ]` ) ;
647
652
}
648
653
649
654
/**
You can’t perform that action at this time.
0 commit comments