giro
giro
FFilament
Created by giro on 2/26/2024 in #❓┊help
Livewire Component on ModalContent close modal
Hi, I have an Action that show a ModalContent wiht a view that have a livewire component, how from that livewire component can close modal. I know that I can dispatch a close-modal event but how I know modal ID? Thanks
2 replies
FFilament
Created by giro on 2/5/2024 in #❓┊help
Action call from livewire function
Is possible to call a model action from a livewire function. For example:
public function selectBillingImport($section)
{
$action = Action::make('select-billing-import')
->label('Importar')->modalHeading('Importar datos')
->successNotificationTitle('Ok imported')->disabledForm()
->modalContent(fn (): View => view(
'import.billing',
))->modalContentFooter(null)->modalSubmitAction(false)->modalCancelAction(false);
}
public function selectBillingImport($section)
{
$action = Action::make('select-billing-import')
->label('Importar')->modalHeading('Importar datos')
->successNotificationTitle('Ok imported')->disabledForm()
->modalContent(fn (): View => view(
'import.billing',
))->modalContentFooter(null)->modalSubmitAction(false)->modalCancelAction(false);
}
` This not give error but new modal not appear. Thanks.
2 replies
FFilament
Created by giro on 12/19/2023 in #❓┊help
AfterSave and AfterCreate on modal form
When you use a simple modal resource, and don't have EditRecord and CreateRecord class, how you call afterSave and AfterCreate hook function? Thanks.
4 replies
FFilament
Created by giro on 12/4/2023 in #❓┊help
After upgrade filament to 3.1.9 problems
I upgrade to filament 3.1.9 all filament packages and star have problems. Alpine Expression Error: watch is not defined Expression: "function(){this.$wire.$on("deselectAllTableRecords",()=>this.deselectAllRecords()),this.$watch("selectedRecords",()=>{if(!this.shouldCheckUniqueSelection){this.shouldCheckUniqueSelection=!0;return}this.selectedRecords=[...new Set(this.selectedRecords)],this.shouldCheckUniqueSelection=!1})}"
15 replies
FFilament
Created by giro on 11/14/2023 in #❓┊help
CreateOptionForm auto assign after create
Any option to enabled on a Select with a relationship and createOptionForm that when I create a new register this will be assigned to select?
4 replies
FFilament
Created by giro on 8/23/2023 in #❓┊help
Vite problem after upgrade to v3
Hi, After upgrade from v2 to v3, i have an error:
Unable to locate file in Vite manifest: resources/css/filament.css.
Unable to locate file in Vite manifest: resources/css/filament.css.
Npm run build work correct, I clear all caches. Any posible solution?
4 replies
FFilament
Created by giro on 8/21/2023 in #❓┊help
Adding an action to a Livewire component
I try this example from documentation: https://filamentphp.com/docs/3.x/actions/adding-an-action-to-a-livewire-component But button not open modal windows I put livewire component in a x-filament-panels::page
<x-filament-panels::page>
@livewire('featured-image-l-w')
</x-filament-panels::page>
<x-filament-panels::page>
@livewire('featured-image-l-w')
</x-filament-panels::page>
Not error from browser console, and on button push correct(200) network call, with modal html on it, but not show it. Anybody try it?
5 replies
FFilament
Created by giro on 8/3/2023 in #❓┊help
Custom field Open Modal Form
I create a custom field
class FeaturedImage extends Field
{
protected string $view = 'forms.components.featured-image';

public function editAction(): Action
{
return Action::make('updateAuthor')
->form([
Select::make('authorId')
->label('Author')
->options(User::query()->pluck('name', 'id'))
->required(),
])
->action(function (array $data): void {
});
}
}
class FeaturedImage extends Field
{
protected string $view = 'forms.components.featured-image';

public function editAction(): Action
{
return Action::make('updateAuthor')
->form([
Select::make('authorId')
->label('Author')
->options(User::query()->pluck('name', 'id'))
->required(),
])
->action(function (array $data): void {
});
}
}
` Button render correct but modal not open? I use this button on a form
9 replies
FFilament
Created by giro on 8/3/2023 in #❓┊help
Any example of a multilevel category?
If I have a model structure like this.
public function up(): void
{
Schema::create('categories', static function (Blueprint $table) {
$table->id();
$table->string('name');
$table->string('slug')->unique();
$table->text('description')->nullable();
$table
->foreignId('parent_id')
->nullable()
->constrained('categories')
->onDelete('set null');
$table->timestamps();
});
}
public function up(): void
{
Schema::create('categories', static function (Blueprint $table) {
$table->id();
$table->string('name');
$table->string('slug')->unique();
$table->text('description')->nullable();
$table
->foreignId('parent_id')
->nullable()
->constrained('categories')
->onDelete('set null');
$table->timestamps();
});
}
Any example how can I manage this with filament (List/Create)? Thanks.
6 replies