Skip to content

[LiveComponent] Fix default select value with preferred choices #2587

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

Merged
merged 1 commit into from
Mar 3, 2025

Conversation

1ed
Copy link
Contributor

@1ed 1ed commented Feb 21, 2025

Q A
Bug fix? yes
New feature? no
Issues -
License MIT

When there are preferred_choices set for a choice type Symfony
renders them before the actual choices so the default value in the
browser will be the first value of the preferred choices.

@carsonbot carsonbot added Bug Bug Fix Status: Needs Review Needs to be reviewed labels Feb 21, 2025
@smnandre
Copy link
Member

Thank you @1ed !


Thinking out loud here... I'm less and less enjoying this whole mecanism.

I'm starting to wonder if we should not revert it.. instead of trying to decide PHP-side how the browsers behave 🤷‍♂️

@carsonbot carsonbot added Status: Reviewed Has been reviewed by a maintainer and removed Status: Needs Review Needs to be reviewed labels Feb 22, 2025
@1ed 1ed force-pushed the fix-preferred-choices-default-value branch from 080d402 to 6dc6a33 Compare February 22, 2025 23:30
@1ed
Copy link
Contributor Author

1ed commented Feb 22, 2025

Thank you @1ed !

Thinking out loud here... I'm less and less enjoying this whole mecanism.

I'm starting to wonder if we should not revert it.. instead of trying to decide PHP-side how the browsers behave 🤷‍♂️

Probably would be better yes, but I don't know the internals, why was this necessary originally, just wanted to fix the bug.

@smnandre
Copy link
Member

Of course, and thank you again for that !

It was really thinking outloud :))

@Kocal Kocal changed the title [Live] Fix default select value with preferred choices [LiveComponent] Fix default select value with preferred choices Mar 3, 2025
@Kocal
Copy link
Member

Kocal commented Mar 3, 2025

Thank you @1ed.

@Kocal Kocal merged commit 8a11743 into symfony:2.x Mar 3, 2025
57 of 59 checks passed
@1ed 1ed deleted the fix-preferred-choices-default-value branch March 3, 2025 09:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Bug Fix LiveComponent Status: Reviewed Has been reviewed by a maintainer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants