F
Filament13mo ago
Keiron

Actions on Table Component, unable to locate dynamic-component

Hi, I'm new to Filament and am bringing it in into an existing app, so haven't installed panels, just Tables and Forms. I've got my form working, but when I try to create any type of Action on the Table (to edit or even view a resource) I get an error:
Unable to locate a class or view for component [dynamic-component]. (View: /<projectroot>/vendor/filament/actions/resources/views/components/action.blade.php) (View: /<projectroot>/vendor/filament/actions/resources/views/components/action.blade.php) (View: /<projectroot>/usb/vendor/filament/actions/resources/views/components/action.blade.php) (View: /<projectroot>/vendor/filament/actions/resources/views/components/action.blade.php) (View: /<projectroot>/vendor/filament/actions/resources/views/components/action.blade.php) (View: /<projectroot>/vendor/filament/actions/resources/views/components/action.blade.php)
Unable to locate a class or view for component [dynamic-component]. (View: /<projectroot>/vendor/filament/actions/resources/views/components/action.blade.php) (View: /<projectroot>/vendor/filament/actions/resources/views/components/action.blade.php) (View: /<projectroot>/usb/vendor/filament/actions/resources/views/components/action.blade.php) (View: /<projectroot>/vendor/filament/actions/resources/views/components/action.blade.php) (View: /<projectroot>/vendor/filament/actions/resources/views/components/action.blade.php) (View: /<projectroot>/vendor/filament/actions/resources/views/components/action.blade.php)
I've read the documentation, watched the laracasts videos but everything I do results in this error.
public function table(Table $table): Table
{
return $table
->query(Quote::query())
->columns([
// ... Column data here and table working ...

])
->filters([
// ...
])
->actions([
// ...
])
->bulkActions([
// ...
])
->headerActions([
CreateAction::make()
->model(Quote::class)
->form([
]),
])
->searchPlaceholder('Search quotes...');
}
public function table(Table $table): Table
{
return $table
->query(Quote::query())
->columns([
// ... Column data here and table working ...

])
->filters([
// ...
])
->actions([
// ...
])
->bulkActions([
// ...
])
->headerActions([
CreateAction::make()
->model(Quote::class)
->form([
]),
])
->searchPlaceholder('Search quotes...');
}
Am I missing something really obvious? As I can't find anything on this error?
1 Reply
Keiron
KeironOP13mo ago
I've also tried it with
->actions([
Action::make('edit')
->url(fn (Quote $record): string => route('quotes.edit', $record))
->openUrlInNewTab()
])
->actions([
Action::make('edit')
->url(fn (Quote $record): string => route('quotes.edit', $record))
->openUrlInNewTab()
])
(as the documentation suggests, but get the same error 😦 ) I've registered the Laravel Dynamic Component in the AppServiceProvider - doesn't feel like a proper fix, but does resolve it.
Want results from more Discord servers?
Add your server