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

[bug] Combobox needs to map disabled values according to itemValueKey on clearSelected #3063

Closed
stijndeschuymer opened this issue Nov 19, 2024 · 5 comments · Fixed by #3064
Closed

Comments

@stijndeschuymer
Copy link
Contributor

Combobox needs to map disabled values according to itemValueKey on clearSelected.

I'll be submitting a PR with a fix soon.

@Akshat55
Copy link
Contributor

Combobox needs to map disabled values according to itemValueKey on clearSelected.

Could you provide some more context on this? Why is this a bug? What is the current result? What is the expected result?

I'm confused because when the combo box clearSelected is called, the output should be an empty array AFTER all list items selected state is set to false.

@stijndeschuymer
Copy link
Contributor Author

As this comment in the code shows: https://github.com/carbon-design-system/carbon-components-angular/pull/3064/files#diff-c162199cd5e798879e7cd8b55e42def0e32ac187f4abdbddf5ffe17b19a9251aR681

So usually when clearSelected is called, the output should indeed be empty, unless when there are selected items that are disabled!
Thats the issue.
When there are 'selected'+'disabled' items, those items are emitted,
Current result: the entire object for those items is emitted and the object is not mapped to a provided itemValueKey
Expected result: the emitted objects are mapped according to itemValueKey as fixed in this PR: #3064

@Akshat55
Copy link
Contributor

Thanks for the explanation, I was able to reproduce this issue.

Copy link

🎉 This issue has been resolved in version 5.56.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Copy link

🎉 This issue has been resolved in version 6.0.0-rc.2 🎉

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
2 participants