Repeater not showing all rows

Currently I am working on a solution where I can link multiple fields to an end result in a mapping. The inner repeater is not showing all records. Why is this? The form is looking like the following:
Repeater::make('mappings')
->hiddenLabel()
->relationship('mappings')
->columnSpanFull()
->columns(4)
->schema([
Repeater::make('sourceDataFields')
->label('Bron velden')
->relationship()
->orderColumn('sort_order')
->required()
->simple(
Select::make('source_data_field_id')
->label'Bron veld')
->live()
->options(SourceDataField::get()->pluck('key', 'id'))
->helperText(function ($state): ?string {
if (empty($state)) {
return null;
}

$sourceDataField = $this->record->sourceDataFields()->find($state);

if ($sourceDataField === null) {
return null;
}

return $sourceDataField->preview_value ?? 'Geen voorbeeldwaarde';
})
),
]),
Repeater::make('mappings')
->hiddenLabel()
->relationship('mappings')
->columnSpanFull()
->columns(4)
->schema([
Repeater::make('sourceDataFields')
->label('Bron velden')
->relationship()
->orderColumn('sort_order')
->required()
->simple(
Select::make('source_data_field_id')
->label'Bron veld')
->live()
->options(SourceDataField::get()->pluck('key', 'id'))
->helperText(function ($state): ?string {
if (empty($state)) {
return null;
}

$sourceDataField = $this->record->sourceDataFields()->find($state);

if ($sourceDataField === null) {
return null;
}

return $sourceDataField->preview_value ?? 'Geen voorbeeldwaarde';
})
),
]),
3 Replies
Kaaiman
KaaimanOP4mo ago
This is how the DB table is looking with records:
No description
Kaaiman
KaaimanOP4mo ago
This is what filament is showing me:
No description
Kaaiman
KaaimanOP4mo ago
Nevermind I fixed it already. It wasn't working due to the missing incrementing column on the pivot table

Did you find this page helpful?