ui5-webcomponents icon indicating copy to clipboard operation
ui5-webcomponents copied to clipboard

[SF_ACC][ComboBox]: The option list does not scroll down automatically to the selected item

Open i323808 opened this issue 1 year ago • 4 comments

Bug Description

The option list does not scroll down automatically to the selected item when open the drop-down list.

Affected Component

No response

Expected Behaviour

The option list should be scrolled down automatically and bring the selected item into view when open the drop-down list.

Isolated Example

https://stackblitz.com/edit/js-rf5pbv2j?file=comboBox.js

Steps to Reproduce

  1. navigate to https://stackblitz.com/edit/js-rf5pbv2j?file=comboBox.js
  2. open the drop-down list of ComboBox
  3. the option list does not scroll down automatically
  4. the option list of the Select component can scroll down automatically

Log Output, Stack Trace or Screenshots

No response

Priority

None

UI5 Web Components Version

2.11.0

Browser

Chrome

Operating System

No response

Additional Context

No response

Organization

No response

Declaration

  • [x] I’m not disclosing any internal or sensitive information.

i323808 avatar Jul 17 '25 07:07 i323808

Hello @SAP/ui5-webcomponents-topic-rl,

Affected component: ui5-combobox Steps to reproduce:

  1. navigate to https://stackblitz.com/edit/js-rf5pbv2j?file=comboBox.js
  2. open the drop-down list of ComboBox
  3. the option list does not scroll down automatically
  4. the option list of the Select component can scroll down automatically

Expected Behavior: Opening the drop down it should scroll to selected value(in sapui5 it works as such) Actual Behavior: Opening the drop down stays on the top of the list

Best Regards, Gergana

GerganaKremenska avatar Jul 17 '25 10:07 GerganaKremenska

Hi @i323808,

The problem with the ComboBox not scrolling to the selected item when opening the dropdown is now fixed. The selected item will now automatically be scrolled into view when the list opens.

However, we noticed in the provided example that you’re using the selected attribute on ui5-cb-item.

Just to clarify — unlike in ui5-select, the ui5-cb-item component does not support a public selected property. In the ComboBox, selection is controlled via the value property on the ui5-combobox itself, for example:

ui5-combobox value="Last" So you can safely remove the selected attribute from the items — it has no effect.

Best regards, Stefan

StefanDimitrov04 avatar Jul 24 '25 09:07 StefanDimitrov04

This issue has been closed. To reopen, just leave a comment!

github-actions[bot] avatar Jul 24 '25 09:07 github-actions[bot]

:tada: This issue has been resolved in version v2.13.0-rc.3 :tada:

The release is available on v2.13.0-rc.3

Your semantic-release bot :package::rocket:

ui5-webcomponents-bot avatar Jul 31 '25 08:07 ui5-webcomponents-bot