Skip to content

fix(dropdown-list): only updateIndex if there's no index yet#3139

Merged
Akshat55 merged 2 commits intocarbon-design-system:masterfrom
klaascuvelier:fix-3138-dropdown-list-index
May 7, 2025
Merged

fix(dropdown-list): only updateIndex if there's no index yet#3139
Akshat55 merged 2 commits intocarbon-design-system:masterfrom
klaascuvelier:fix-3138-dropdown-list-index

Conversation

@klaascuvelier
Copy link
Copy Markdown
Contributor

Closes #3138

Upon creation of the dropdown-list, the getUpdateIndex and getNextElement get called 4 times, incrementing the index for the highlighted element to the 4th item. This is unwanted behavior and this MR fixes it

Changelog

Changed

  • Check if there's no index set before changing it

@klaascuvelier klaascuvelier requested a review from a team as a code owner May 5, 2025 13:50
@netlify
Copy link
Copy Markdown

netlify bot commented May 5, 2025

Deploy Preview for carbon-components-angular ready!

Name Link
🔨 Latest commit 183f7ca
🔍 Latest deploy log https://app.netlify.com/sites/carbon-components-angular/deploys/681ab2adc824560008feeb49
😎 Deploy Preview https://deploy-preview-3139--carbon-components-angular.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@Akshat55 Akshat55 merged commit b3b4529 into carbon-design-system:master May 7, 2025
14 checks passed
@github-actions
Copy link
Copy Markdown

github-actions bot commented May 7, 2025

🎉 This PR is included in version 5.57.7 🎉

The release is available on:

Your semantic-release bot 📦🚀

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.

Dropdown-list highlights 4th element in the list upon creation

2 participants