carloscapote
carloscapote
FFilament
Created by Craig Potter on 10/13/2023 in #❓┊help
Pasting in to a tagsInput splits a string
I'm not the original poster but I arrived here because I was facing the same issue. I just tried adding ->debounce(500) but it keeps happening. I've tested this with the latest versions of the framework Filament (3.0-stable), Laravel (10.10) and it happens both in Firefox and Chrome.
8 replies
FFilament
Created by carloscapote on 9/27/2023 in #❓┊help
How do you test FileUpload input fields?
I found this article about how to test file uploads in Laravel (not in particular in Filament): https://laravel-news.com/testing-file-uploads-with-laravel. I'm giving it a try, now.
4 replies
FFilament
Created by Maagalhaes on 8/15/2023 in #❓┊help
TextInput does not add mask to field
FYI: I just created a new issue as I couldn't reopen yours. This time I included a reproduction case in which I show that the same mask used in a Livewire component without Filament, actually works (in Firefox): https://github.com/filamentphp/filament/issues/8560
22 replies
FFilament
Created by Maagalhaes on 8/15/2023 in #❓┊help
TextInput does not add mask to field
@mtbossa, Have you tried this since the last message? I've found some weird behaviors that I think that are related: 1. any Alpine mask seems to be ignored in Firefox when used from Filament, 2. in a clean Alpine project (or even in this page: https://alpinejs.dev/plugins/mask) the Alpine masks actually work smoothly in Firefox.
22 replies
FFilament
Created by Anik on 9/16/2023 in #❓┊help
Radio components
Try this:
\Filament\Forms\Components\Radio::make('status')
->options([
'draft' => new \Illuminate\Support\HtmlString('You can use <i>HTML</i> here'),
'scheduled' => 'Scheduled',
'published' => 'Published'
]),
\Filament\Forms\Components\Radio::make('status')
->options([
'draft' => new \Illuminate\Support\HtmlString('You can use <i>HTML</i> here'),
'scheduled' => 'Scheduled',
'published' => 'Published'
]),
3 replies
FFilament
Created by carloscapote on 9/14/2023 in #❓┊help
Disable field if a relation manager has records
Ok, nevermind. I wasn't properly dispatching the event in the action. Here's a summary on how to make it work: 1. you don't need to make the select reactive nor live, 2. in the after method of your actions in the relation manager, you have to dispatch an event
Tables\Actions\CreateAction::make()
->after(function ($livewire) {
$livewire->dispatch('orderLineCreated');
}),
Tables\Actions\CreateAction::make()
->after(function ($livewire) {
$livewire->dispatch('orderLineCreated');
}),
3. in the EditOrder page, you have to listen the event and call fillForm so the disabled method is executed:
class EditOrder extends EditRecord
{
protected $listeners = [
'orderLineCreated' => 'refreshForm',
'orderLineEdited' => 'refreshForm',
'orderLineDeleted' => 'refreshForm',
];

public function refreshForm()
{
$this->fillForm();
}
...
class EditOrder extends EditRecord
{
protected $listeners = [
'orderLineCreated' => 'refreshForm',
'orderLineEdited' => 'refreshForm',
'orderLineDeleted' => 'refreshForm',
];

public function refreshForm()
{
$this->fillForm();
}
...
7 replies
FFilament
Created by carloscapote on 9/14/2023 in #❓┊help
Disable field if a relation manager has records
The issue is that I can't manage to make the disabled closure be executed when lines are changed. I guess there must be a way to execute it with events but I haven't been able to guess how yet
7 replies
FFilament
Created by carloscapote on 9/14/2023 in #❓┊help
Disable field if a relation manager has records
Yeap, but didn't work. Also tried dispatching events in the relation manager actions that triggered a fillForm when records were modified (added, changed, or deleted) but it didn't work either
7 replies