SAP / ui5-webcomponents

UI5 Web Components - the enterprise-flavored sugar on top of native APIs! Build SAP Fiori user interfaces with the technology of your choice.
https://sap.github.io/ui5-webcomponents/
Apache License 2.0
1.47k stars 254 forks source link

ui5-combobox-item: `getDomRef()` returns undefined #8841

Closed Lukas742 closed 1 month ago

Lukas742 commented 2 months ago

Bug Description

When calling the getDomRef method of an ComboBoxItem, it doesn't return the element inside the shadow root, but undefined.

Affected Component

ComboBoxItem

Expected Behaviour

No response

Isolated Example

https://stackblitz.com/edit/js-k4ebjr?file=index.js,index.html

Steps to Reproduce

  1. Go to StackBlitz
  2. Click on the "Log getDomRef()" button
  3. See that only for the MultiComboBoxItem the correct value is returned

Log Output, Stack Trace or Screenshots

No response

Priority

None

UI5 Web Components Version

1.24.0

Browser

Chrome

Operating System

No response

Additional Context

No response

Organization

No response

Declaration

NHristov-sap commented 2 months ago

Hello @ui5-webcomponents-topic-rl,

Can you please check if the abstract ComboBoxItem should have DOM ref or not. If it should, please check why it is undefined.

Best Regards, Nikolay Hristov UI5 WebComponents Dispatcher

Lukas742 commented 2 months ago

Hi @NHristov-sap

thanks for processing this issue. According to your docs, getDomRef should return the element that represents the abstract component:

Note: For logical (abstract) elements (items, options, etc...), returns the part of the parent's DOM that represents this option