Skip to content
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

fix: handle null in writeValue when in multiselect mode and itemValueKey is defined #3073

Conversation

koenvd
Copy link
Contributor

@koenvd koenvd commented Nov 25, 2024

Closes #2931

Noticed when in multiselect mode and when defining itemValueKey writeValue cannot properly handle null.
Screenshot 2024-11-25 at 12 33 39

Added fallback for null, added test to make sure as well the model is updated by itemValueKey when defined and not with the complete objects.

@koenvd koenvd requested a review from a team as a code owner November 25, 2024 11:38
Copy link

netlify bot commented Nov 25, 2024

Deploy Preview for carbon-components-angular ready!

Name Link
🔨 Latest commit 1a4b698
🔍 Latest deploy log https://app.netlify.com/sites/carbon-components-angular/deploys/6744624e2fff0000081f3fd2
😎 Deploy Preview https://deploy-preview-3073--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.

@koenvd koenvd force-pushed the combobox_value_safety_in_multi_select branch from 01b8517 to 1a4b698 Compare November 25, 2024 11:41
@koenvd koenvd requested a review from Akshat55 November 25, 2024 14:58
@Akshat55 Akshat55 changed the title Properly handle null in writeValue when in multiselect mode and itemValueKey is defined fix: handle null in writeValue when in multiselect mode and itemValueKey is defined Nov 25, 2024
@Akshat55 Akshat55 merged commit f1d1f16 into carbon-design-system:master Nov 25, 2024
14 checks passed
Copy link

🎉 This PR is included in version 5.56.3 🎉

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.

Combobox value safety (in case of undefined)
2 participants