Skip to content

Infolist with RepeatableEntry and Array #8753

Answered by dave-mills
flolanger asked this question in Help
Discussion options

You must be logged in to vote

The RepeatableEntry is looking for a customers key in your array. Reshaping your array to this should work.

$infolist
    ->state([
        'customers' => [
        [
            'id' => 2,
            'expected' => 12457,
            'booked' => 12457,
        ],
        [
            'id' => 4,
            'expected' => 12457,
            'booked' => 12457,
        ],
        ]
    ])
    ->schema([
        RepeatableEntry::make('customers')
            ->schema([
                TextEntry::make('expected')
                    ->label('Expected'),
                TextEntry::make('booked')
                    ->label('Booked'),
            ]),

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@leandrocfe
Comment options

@faizananwerali
Comment options

Answer selected by flolanger
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
4 participants