FilamentF
Filament10mo ago
Matt

Customize option labels in a relation manager attach action

I need to customize the option labels in a relation manager attach action.
I have tried the following
Tables\Actions\AttachAction::make()
                    ->recordSelect(function (Forms\Components\Select $select) {
                        return $select
                            ->getOptionLabelFromRecordUsing(fn ($record) => "{$record->id}. $record->name");
                    }),


But that gets overwritten, still only showing the record title attribute defined in the relationship
I'm not getting any errors, it just isn't working.
Does anyone have any ideas?
Was this page helpful?