F
Filamentβ€’12mo ago
szucs996#1

Not loading labels

Hey, On the relation manager the attach button, with custom form doesn't load the labels. Using the resource table in the relation manager and the attach button in the ->headerActions function.
Tables\Actions\AttachAction::make()
->form(fn (AttachAction $action): array => [
$action->getRecordSelect(),
Forms\Components\Select::make('status')
->options(Customer::$status)
->default('new'),
Forms\Components\Select::make('role')
->options(Company::$roles)
->default('worker'),
])
->preloadRecordSelect()
Tables\Actions\AttachAction::make()
->form(fn (AttachAction $action): array => [
$action->getRecordSelect(),
Forms\Components\Select::make('status')
->options(Customer::$status)
->default('new'),
Forms\Components\Select::make('role')
->options(Company::$roles)
->default('worker'),
])
->preloadRecordSelect()
See image, any idea? πŸ™‚
No description
4 Replies
DrByte
DrByteβ€’12mo ago
->options(Customer::$status)
What does Customer::$status refer to? Is the $ intended? Why not Customer::class ?
szucs996#1
szucs996#1OPβ€’12mo ago
the issue is on this: $action->getRecordSelect(), Anyone? πŸ™‚
Dennis Koch
Dennis Kochβ€’12mo ago
Can you share the rest of the RM?
szucs996#1
szucs996#1OPβ€’12mo ago
had to add $recordTitleAttribute .
Want results from more Discord servers?
Add your server