Skip to content

Commit

Permalink
Merge pull request #1 from borjajimnz/fix/apply_to_view_record
Browse files Browse the repository at this point in the history
apply refreshFormData fix to ViewRecord
  • Loading branch information
borjajimnz authored Feb 5, 2025
2 parents 378df43 + 735b383 commit c657f7c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/panels/src/Resources/Pages/ViewRecord.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,12 @@ protected function fillFormWithDataAndCallHooks(Model $record, array $extraData
*/
public function refreshFormData(array $attributes): void
{
$this->data = [
$data = [
...$this->data,
...Arr::only($this->getRecord()->attributesToArray(), $attributes),
];

$this->form->fill($data);
}

/**
Expand Down

0 comments on commit c657f7c

Please sign in to comment.