Veur
Veur
FFilament
Created by Veur on 7/11/2024 in #❓┊help
Customizing Notification position & styling on the fly
I might look into that, thanks
5 replies
FFilament
Created by Veur on 7/11/2024 in #❓┊help
Customizing Notification position & styling on the fly
Thanks @toeknee I tried that, but ->extraAttributes() is not available on the Notification class
5 replies
FFilament
Created by Veur on 7/9/2024 in #❓┊help
Broadcasted Notifications are completed in Horizon, but not received by Reverb
It works when I add the trait BroadcastsEvents and the broadcastOn() method to the OrderCreatedNotification class:
public function broadcastOn(): array
{
return [
new PrivateChannel('users.1'),
];
}
public function broadcastOn(): array
{
return [
new PrivateChannel('users.1'),
];
}
But this is not documented anywhere in Laravel, so I doubt this really is the correct solution...
2 replies
FFilament
Created by Veur on 6/5/2024 in #❓┊help
Testing Repeater component
@Leandro Ferreira thanks 😅
4 replies
FFilament
Created by Veur on 4/8/2024 in #❓┊help
Update Select options after event
Ok, thanks!
24 replies
FFilament
Created by Veur on 4/8/2024 in #❓┊help
Update Select options after event
Is that a bug or expected behavior?
24 replies
FFilament
Created by Veur on 4/8/2024 in #❓┊help
Update Select options after event
@Leandro Ferreira one thing I forgot to mention is that the Select field is a multiple select ->multiple() And when I remove that, the options are being refreshed using Livewire's $refresh event. Any idea why it's not working with ->multiple()? The solution with dispatchFormEvent() still won't work btw.
24 replies
FFilament
Created by Veur on 4/8/2024 in #❓┊help
Update Select options after event
@Leandro Ferreira yes this is basically what I'm doing, only my form is in another component. Maybe that's the reason it's not working?
24 replies
FFilament
Created by Veur on 4/8/2024 in #❓┊help
Update Select options after event
The modal is a separate (non-Filament) Livewire component
24 replies
FFilament
Created by Veur on 4/8/2024 in #❓┊help
Update Select options after event
In the modal component, after saving the options and before closing the modal
24 replies
FFilament
Created by Veur on 4/8/2024 in #❓┊help
Update Select options after event
24 replies
FFilament
Created by Veur on 4/8/2024 in #❓┊help
Update Select options after event
Select::make('select')
->options($field->selectOptions())
->registerListeners([
'updateOptions' => [
function (Select $component) use ($field): void {
dd($component);
$component->options($field->selectOptions());
},
],
])
Select::make('select')
->options($field->selectOptions())
->registerListeners([
'updateOptions' => [
function (Select $component) use ($field): void {
dd($component);
$component->options($field->selectOptions());
},
],
])
And from the modal where the options are managed: $this->dispatchFormEvent('updateOptions'); I also implemented HasForms and added use InteractsWithForms; to the modal.
24 replies
FFilament
Created by Veur on 4/8/2024 in #❓┊help
Update Select options after event
I'm also trying to find documentation about this feature, but it's not documented
24 replies
FFilament
Created by Veur on 4/8/2024 in #❓┊help
Update Select options after event
@Leandro Ferreira thanks, but it doesn't work. I added a dd() to the listener callback but nothing happens
24 replies
FFilament
Created by Veur on 4/8/2024 in #❓┊help
Update Select options after event
Ok, below is a simplified example:
protected function form(Form $form): Form
{
return $form->schema($fieldsFromDb->map(fn (FormField $field) => Select::make($field->name)->options($field-getOptions()))
->flatten()
->toArray()
);
}
protected function form(Form $form): Form
{
return $form->schema($fieldsFromDb->map(fn (FormField $field) => Select::make($field->name)->options($field-getOptions()))
->flatten()
->toArray()
);
}
$fieldsFromDb is a Collection with fields from the database. getOptions() is a method in the FormField model that returns the options for that specific field. This all works fine, but I don't know how to refresh the list of options.
24 replies
FFilament
Created by Veur on 4/8/2024 in #❓┊help
Update Select options after event
@Leandro Ferreira yeah, but my form has a lot of Select fields with own options. The options can be edited inside a modal. So, I'm dispatching an event from the modal to the form, but I don't know how to 'refresh' the select component. I tried $this->dispatch('$refresh'); from the modal, but no luck
24 replies
FFilament
Created by Veur on 1/10/2024 in #❓┊help
CreateOptionForm is not showing
That was it, thanks @Leandro Ferreira! 🙂 I thought that wasn't needed anymore in V3
5 replies
FFilament
Created by Veur on 12/12/2023 in #❓┊help
Custom theme: Unable to locate file in Vite manifest
Thanks!
11 replies
FFilament
Created by Veur on 12/12/2023 in #❓┊help
Custom theme: Unable to locate file in Vite manifest
Ah, of course 🙂
11 replies
FFilament
Created by Veur on 12/11/2023 in #❓┊help
Add an Action to a Form label or hint
@Lara Zeus hero! Thanks!
14 replies