Skip to content

[LiveComponent] Working around issue where FormView is passed to the component #943

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
Jun 14, 2023

Conversation

weaverryan
Copy link
Member

@weaverryan weaverryan commented Jun 14, 2023

Q A
Bug fix? yes
New feature? no
Tickets Conversation with @1ed on Slack
License MIT

In this case, the FormView will likely be initialized with certain data and, in the case of something like a CollectionType, it will have certain children fields. If we try to get the "form instance", that will be created "fresh" with different data and different fields, which causes the "compound" check to fail.

Getting the "compound" from the form instance was always a workaround for autocomplete, which tricks us by changing their compound flag. This goes back to the original logic, with a workaround for autocomplete.

Cheers!

@weaverryan weaverryan force-pushed the fix-live-component-form-compound branch from 1dbe927 to 67bc0ea Compare June 14, 2023 16:05
@weaverryan weaverryan merged commit b1aba24 into symfony:2.x Jun 14, 2023
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.

1 participant