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

Fix for livewire form properties not being found. #16

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Fsmash
Copy link

@Fsmash Fsmash commented Apr 2, 2024

Fix for nested livewire form properties not being found as discussed in issue #15. Tried to be as unobtrusive as possible. Additional reflection was not necessary since "DataStore" already holds the "BladeComponentData" for Livewire forms.

Only issue is that this fix only supports one level of nesting and the class with the nested properties must also be a Livewire component. I could have made a recursive function and implemented actual reflection for classes not found in the "availableComponents" array, but I don't think that is a good idea. This should be fine since it doesn't support bad programming practices with Livewire. Livewire properties really shouldn't be nested more than one level deep, and they really should be in a Livewire form if they are nested.

Lastly, I wanted to write a test but ran into this issue. Didn't look that deep into it but if it is a simple fix let me know.

image

@haringsrob
Copy link
Owner

If anyone can confirm this works I can merge it :)

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