Conversation
Small improver
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6e16715ce3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| // Update mode | ||
| if ($model instanceof Model) { | ||
| $model->update($data); | ||
| $dehydrator->dehydrate($data, $model); |
There was a problem hiding this comment.
Strip relationship repeater data before saving parent
When a form includes Repeater::make('children')->relationship('children'), the validated $data still contains the children array here, so dehydrate() sets it as a normal attribute on the parent and save() tries to persist a non-existent children column before RelationshipSaveHandler can sync the has-many rows. This makes relationship-backed repeaters fail on the parent save; remove relationship repeater keys from the parent payload before dehydrating.
Useful? React with 👍 / 👎.
|
|
||
| assert($field instanceof MorphToSelect); | ||
|
|
||
| $wireModifier = $field->getWireModelModifier(); |
There was a problem hiding this comment.
Render MorphToSelect without missing field methods
Any MorphToSelect render reaches this call, but MorphToSelect extends Component directly and does not use the CanBeLive/placeholder field traits, so getWireModelModifier() is undefined (and getPlaceholder() later is too). The field therefore throws while rendering instead of showing the selects; either make it inherit the same field behavior as other inputs or avoid calling methods it does not provide.
Useful? React with 👍 / 👎.
No description provided.