Skip to content

refactor: calculate initially focused index based on _dropdownItems - #6979

Merged
vursen merged 1 commit into
mainfrom
refactor/move-focused-index-computation
Dec 18, 2023
Merged

vursen merged 1 commit into
mainfrom
refactor/move-focused-index-computation

Conversation

@vursen

@vursen vursen commented Dec 18, 2023 •

Copy link
Copy Markdown
Contributor

Description

Following up on #6685, this PR refactors combo-box to calculate the initially focused index based on _dropdownItems instead of filteredItems. This aligns it with the arrow navigation logic which calculates the focused index based on _dropdownItems. The previous version hasn't caused real issues because multi-select-combo-box, which overrides _setDropdownItems, doesn't currently shuffle items when a filter is applied.

Type of change

  • Refactor

@vursen vursen changed the title refactor: set initially focused index in _setDropdownItems refactor: calculate initially focused index based on _dropdownItems Dec 18, 2023
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@vursen
vursen requested a review from web-padawan December 18, 2023 08:23
@vursen
vursen marked this pull request as ready for review December 18, 2023 08:23
@vursen
vursen merged commit 1c73649 into main Dec 18, 2023
@vursen
vursen deleted the refactor/move-focused-index-computation branch December 18, 2023 09:27
@vaadin-bot

Copy link
Copy Markdown
Collaborator

This ticket/PR has been released with Vaadin 24.4.0.alpha1 and is also targeting the upcoming stable 24.4.0 version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants