shellbar-items are not getting the correct stable-dom-ref added to data-ui5-stable
See original GitHub issueBug Description
The shellbar supports passing a stable-dom-ref onto custom shellbar items using the stable-dom-ref attribute on the <ui5-shellbar-item> - this functionality is not working any longer in version 1.0.X
Expected Behavior
The <ui5-shellbar-item> stable-dom-ref should be added to the <ui5-button> without being changed.
Steps to Reproduce
- https://codesandbox.io/s/ui5-webcomponents-forked-r4mxu?file=/index.html
- Press the button “Check stable-dom-ref”
Expected: it should say “found: true” Actual: it says “found: false”
Inspect the todo button top-right corner, and see that the stable-dom-ref is some generated ID and is not the expected value of “Todos” which is provided in the shellbar-item:
<ui5-shellbar>
<ui5-shellbar-item stable-dom-ref="Todos"></ui5-shellbar-item>
</ui5-shellbar>
Isolated Example
https://codesandbox.io/s/ui5-webcomponents-forked-r4mxu?file=/index.html
Context
- UI5 Web Components version: 1.0.2
- OS/Platform: any
- Browser: any
- Affected component: ui5-shellbar
Log Output / Stack Trace / Screenshots
{...}
Priority
- Low
- Medium
- High
- Very High
The priority indicates the severity of the issue. To set the appropriate priority consider the following criteria:
- Breaks entire application or system - High or Very High
- Accessibility issue - Medium or High
- Functional issue - Medium or High
- Visual issue - Low or Medium
Note: The priority might be re-evaluated by the issue processor.
Stakeholder Info (if applicable)
- Organization: SuccessFactors
- Bussiness impact: Integration with EnableNow/WebAssistant/WalkMe
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (5 by maintainers)

Top Related StackOverflow Question
Hi @codefactor
Instead of using the
stable-dom-refconcept, you should call thegetDomRefmethod on the element that you wish. For example:will return the DOM ref of the element
Linking to 2 other issues that are related: https://github.com/SAP/ui5-webcomponents/issues/4130 https://github.com/SAP/ui5-webcomponents/issues/1840