awcodes / filament-table-repeater

A modified version of the Filament Forms Repeater to display it as a table.
MIT License
188 stars 42 forks source link

Undefined array key 0 #106

Closed tangjh closed 4 months ago

tangjh commented 4 months ago

Filament Version

v3

Plugin Version

v3.0.2

PHP Version

PHP 8.1.27

Problem description

ErrorException: Undefined array key 0 when creating a new Item:

image

Click on New:

image

Code: public static function form(Form $form): Form { return $form ->schema([ Forms\Components\TextInput::make('field1'), Forms\Components\TextInput::make('field2'), Forms\Components\TextInput::make('field3'), \Awcodes\TableRepeater\Components\TableRepeater::make('details') ->relationship('details') ->schema([ Forms\Components\TextInput::make('field4'), Forms\Components\TextInput::make('field5'), Forms\Components\TextInput::make('field6') ->hidden(fn (string $operation): bool => $operation === 'view'), ]), ]); }

Migration: /**

Expected behavior

Display the creation form

Steps to reproduce

As explain above

Reproduction repository

No response

Relevant log output

No response

awcodes commented 4 months ago

Please review the readme. You need to define your Headers.