Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

klaascuvelier
Copy link
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
Copy link

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
Copy link

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