awcodes/filament-table-repeater

The documentation for the headers() method requires updating.

Closed this issue · 1 comments

Filament Version

v3

Plugin Version

v2.1

PHP Version

PHP 8.3

Problem description

I could never get the headers() method to function as expected, decided to look into the source code to figure out what's happening.

In reference to the documentation, the table headers can be modified by passing an array of the desired headers to the headers() method. For example:

TableRepeater::make('product') ->headers(['Product Name', 'Quantity'])

However, it should be noted that the correct syntax involves including the field name as the key otherwise TableRepeater will simply use the default label of the fields.

TableRepeater::make('social') ->headers(['name' => 'Product Name', 'qty' -> 'Quantity'])

Expected behavior

For the headers to work

Steps to reproduce

Provide an array to the headers() method without specifying keys.

Reproduction repository

No response

Relevant log output

No response

Has been updated. Thanks.