Skip to content

Commit

Permalink
Merge pull request #48 from awcodes/fix/required-header
Browse files Browse the repository at this point in the history
Fix: is required if field method doesn't exist
  • Loading branch information
awcodes authored Jul 5, 2023
2 parents 073aaa5 + 13388c0 commit 9529a39
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Components/TableRepeater.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public function getHeaders(): array
$item = [
'label' => $customHeaders[$key] ?? $field->getLabel(),
'width' => $this->getColumnWidths()[$key] ?? null,
'required' => $field->isRequired(),
'required' => method_exists($field, 'isRequired') ? $field->isRequired() : false,
];

$mergedHeaders[method_exists($field, 'getName') ? $field->getName() : $field->getId()] = $item;
Expand Down

0 comments on commit 9529a39

Please sign in to comment.