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

custom selected options always get a selected value index of 0 #246

Merged

Conversation

jachin
Copy link

@jachin jachin commented Sep 13, 2023

To fix this I had to change up some of the logic and that broke some unit tests having to do with merging options. I think I solved by by making the selectOptions function a bit more complicated. It's behavior seems pretty sensible so I think it's OK.

But I can't help but wonder if the options that are coming in to be selected should already have a selected index on them.

the selected value index of 0.

To fix this I had to change up some of the logic and that broke some unit tests
having to do with merging options. I think I solved by by making the `selectOptions`
function a bit more complicated. It's behavior seems pretty sensible so I think it's OK.

But I can't help but wonder if the options that are coming in to be selected should already have a selected index on them.
@jachin jachin linked an issue Sep 13, 2023 that may be closed by this pull request
@jachin jachin changed the title Fixing the bug that was causing custom selected options to end up with custom selected options to end up with the selected value index of 0 Sep 13, 2023
@jachin jachin changed the title custom selected options to end up with the selected value index of 0 custom selected options always get a selected value index of 0 Sep 13, 2023
@jachin jachin marked this pull request as ready for review September 13, 2023 17:20
@jachin jachin merged commit 7cd4c59 into master Sep 13, 2023
1 check passed
@jachin jachin deleted the 244-custom-options-jump-to-the-front-of-the-selected-items branch September 13, 2023 17:20
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.

Custom Options jump to the front of the selected items
1 participant