[SF_ACC][ComboBox]: The option list does not scroll down automatically to the selected item
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
- navigate to https://stackblitz.com/edit/js-rf5pbv2j?file=comboBox.js
- open the drop-down list of ComboBox
- the option list does not scroll down automatically
- 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.
Hello @SAP/ui5-webcomponents-topic-rl,
Affected component: ui5-combobox Steps to reproduce:
- navigate to https://stackblitz.com/edit/js-rf5pbv2j?file=comboBox.js
- open the drop-down list of ComboBox
- the option list does not scroll down automatically
- 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
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
ui5-combobox value="Last" So you can safely remove the selected attribute from the items — it has no effect.
Best regards, Stefan
This issue has been closed. To reopen, just leave a comment!
: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: