Alex Manase
Alex Manase
FFilament
Created by Alex Manase on 6/12/2024 in #❓┊help
How to test `headerActions`/`footerActions` from the Section component?
I use a section, like the one from documenatation, that contains and action in headerActions. How can I test it? I tried using callFormComponentAction, but it didn't work. https://filamentphp.com/docs/3.x/forms/layout/section#adding-actions-to-the-sections-header
6 replies
FFilament
Created by Alex Manase on 3/25/2024 in #❓┊help
FileUpload: "Browse" button is frozen when the component is inside a Repeater
Hi, there! The "Browse" button from FileUpload component is frozen when it is inside a repeater, but I can upload the file if I drag and drop the file. My form schema:
Repeater::make('photos')
->label('')
->addActionLabel('Add')
->schema([
TextInput::make('photo_title')
->maxLength(100),
FileUpload::make('photo')
->image()
->openable()
]),
Repeater::make('photos')
->label('')
->addActionLabel('Add')
->schema([
TextInput::make('photo_title')
->maxLength(100),
FileUpload::make('photo')
->image()
->openable()
]),
The console log when I create a repeater field:
Livewire Entangle Error: Livewire property ['data.photos.d1c2ef2b-f257-47e8-bf25-1a3a1cdc0bed.file'] cannot be found on component: ['app.filament.admin.resources.house-resource.pages.edit-house']
Livewire Entangle Error: Livewire property ['data.photos.d1c2ef2b-f257-47e8-bf25-1a3a1cdc0bed.file'] cannot be found on component: ['app.filament.admin.resources.house-resource.pages.edit-house']
Thank you!
3 replies
FFilament
Created by Alex Manase on 9/19/2023 in #❓┊help
Filter for unique values is not working
Hi there! I tried to create a filter for a table, and it didn't work:
Filter::make('is_unique')
->label('Unique')
->query(
fn (Builder $query): Builder => $query->select()->groupBy('phone')
)
Filter::make('is_unique')
->label('Unique')
->query(
fn (Builder $query): Builder => $query->select()->groupBy('phone')
)
5 replies
FFilament
Created by Alex Manase on 9/19/2023 in #❓┊help
Public method [mountAction] not found on component when adding an action to a form modal
Hi there! I treid to add another button to the form modal, like in the documentation (https://filamentphp.com/docs/3.x/actions/modals#opening-another-modal-from-an-extra-footer-action), and I've got the following error when I press the button of the action:
Unable to call component method. Public method [mountAction] not found on component.
Unable to call component method. Public method [mountAction] not found on component.
2 replies
FFilament
Created by Alex Manase on 9/12/2023 in #❓┊help
How to validate a single field when using a form action?
Is there a way to validate a single field inside a form action? I tried to validate the field keywords, but it didn't work:
TextInput::make('keywords')
->required()
->maxLength(255)
,
Filament\Forms\Components\Actions::make([
Filament\Forms\Components\Actions\Action::make('generate')
->action(function () {
$this->validateOnly('keywords');

})
TextInput::make('keywords')
->required()
->maxLength(255)
,
Filament\Forms\Components\Actions::make([
Filament\Forms\Components\Actions\Action::make('generate')
->action(function () {
$this->validateOnly('keywords');

})
22 replies
FFilament
Created by Alex Manase on 7/24/2023 in #❓┊help
Scripts are not loaded in production
15 replies
FFilament
Created by Alex Manase on 7/4/2023 in #❓┊help
Call to undefined method Illuminate\Database\Eloquent\Relations\BelongsToMany::getOwnerKeyName()
Hi there! Created a simple BelgonsToMany relationship like in Laravel Documentation(https://laravel.com/docs/10.x/eloquent-relationships#many-to-many-defining-the-inverse-of-the-relationship) and I've got the following error:
Call to undefined method Illuminate\Database\Eloquent\Relations\BelongsToMany::getOwnerKeyName()
Call to undefined method Illuminate\Database\Eloquent\Relations\BelongsToMany::getOwnerKeyName()
I've used the example from the FIlament documentation for creating a Select:
Forms\Components\Select::make('projects')
->relationship('projects', 'name'),
Forms\Components\Select::make('projects')
->relationship('projects', 'name'),
https://flareapp.io/share/Lm8MOMpP Thank you!
25 replies