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 repeaters are registered without a populated item #2605

Merged
merged 2 commits into from
Oct 14, 2024

Conversation

Tofandel
Copy link
Contributor

@Tofandel Tofandel commented Jun 11, 2024

Repeaters are registered in the Controller constructor without any model (I'm guessing so that the repeaters are available to the TwillBlocks facade early on)

But this is problematic as then if you change available select options or fields based on the model, the repeater templates are not updated, this PR fixes this issue by registering the repeaters again when they have been populated

It also fixes a performance issue with ->form() being unnecessarily called twice everywhere in the controller (the form method already shares form to laravel)

@Tofandel Tofandel force-pushed the fix/repeater-populated branch 2 times, most recently from 07af4c9 to 1045330 Compare June 11, 2024 16:32
@ifox ifox merged commit 31dc84d into area17:3.x Oct 14, 2024
8 checks passed
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