© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
3 replies
core

dependent select in AttachAction syntax?

I am trying the following: Inside
RecipeResource:
ProductRelationsManager:

->headerActions([
AttachAction::make()
->modalHeading('Add Product')
->modalDescription('Add Product')
->modalSubmitActionLabel('Add')
->attachAnother(false)
->preloadRecordSelect()
->label('Add Product')
->form(fn (AttachAction $action): array => [
Forms\Components\Select::make('category_id')
->placeholder('Select Product Category')
->searchable()
->columnSpan(1)
->live()
->options($product_categories)
->required(),
$action->getRecordSelect(fn (Get $get): Collection => Product::query()
->where('category_id', $get('category_id'))
->pluck('name', 'id')),
Solution
solved it
 Select::make('recordId')
                            ->label('Product')
                            ->options(fn (Get $get): Collection => Product::query()
                                ->where('category_id', $get('category_id'))
                                ->pluck('name', 'id')),
 Select::make('recordId')
                            ->label('Product')
                            ->options(fn (Get $get): Collection => Product::query()
                                ->where('category_id', $get('category_id'))
                                ->pluck('name', 'id')),
Jump to solution
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

Dependent select in attach action
FilamentFFilament / ❓┊help
3y ago
dependent select filter
FilamentFFilament / ❓┊help
2y ago
Dependent select searchable
FilamentFFilament / ❓┊help
3y ago
Dependent select input
FilamentFFilament / ❓┊help
3y ago