F
Filamentβ€’2y 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β€’2y ago
->options(Customer::$status)
What does Customer::$status refer to? Is the $ intended? Why not Customer::class ?
szucs996#1
szucs996#1OPβ€’2y ago
the issue is on this: $action->getRecordSelect(), Anyone? πŸ™‚
Dennis Koch
Dennis Kochβ€’2y ago
Can you share the rest of the RM?
szucs996#1
szucs996#1OPβ€’2y ago
had to add $recordTitleAttribute .

Did you find this page helpful?