Skip to content

Conversation

@gdebrauwer
Copy link
Contributor

@gdebrauwer gdebrauwer commented Jan 29, 2024

In my application, I noticed that the selected option is not styled correctly when the value of the selected option is false or 0.

Screen.Recording.2024-01-29.at.14.11.15.mov

This is caused by the isSelected getter on $listboxOption / $comboboxOption. That getter always returns false if the item's value is falsy. That is not correct if the item's value is false or 0. This PR fixes that.

@gdebrauwer gdebrauwer changed the title Ensure $listboxOption.isSelected (and $comboboxOption.isSelected) works if item value is false or 0 Ensure $listboxOption.isSelected / $comboboxOption.isSelected works if item value is false or 0 Jan 29, 2024
@gdebrauwer gdebrauwer changed the title Ensure $listboxOption.isSelected / $comboboxOption.isSelected works if item value is false or 0 Ensure $listboxOption.isSelected / $comboboxOption.isSelected works if item value is false or 0 Jan 29, 2024
@calebporzio
Copy link
Collaborator

Thanks for this! Super valuable!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants