Huemer
Filament Form Fields as custom components
oh thats definetly good to know at least one option i can delete 😄
yeah just thought it kinda off how hard it is to make the custom field react like a normal livewire component and sadly there is hardly any info on the web.
i tried laracasts video courses but think i need to rewatch the advanced part again
16 replies
Filament Form Fields as custom components
the page lives inside another app, my form field is in it`s own package and should be reused across multiple pages
i think i really just have to rebuild it completly as its own Component instead of a form field and then use the component inside the main application
i think i really just have to rebuild it completly as its own Component instead of a form field and then use the component inside the main application
16 replies
Filament Form Fields as custom components
i tried and just wanted a simple alert() executed but i can´t seem to get it to work
i dispatched the event through
on the web all i read is to wrap it inside a livewire component but can i still call the component through component::make() inside my applications filament resources
@click=$dispatch('name'), wire:click="dispatchFormEvent('name')" also tried $wire.emit()
and it´s variants, but it get´s lost somewhere, trying to execute the public functions directly results in an error saying this are not public functions of the livewire component, so basicly can´t find them
using the $field variable i clearly see the field and the registered listeners but also can´t make it work through that one
listening for events directly on the view from which it gets executed works fine through a window.addEvenetListener(() => alert())
so dispatching the event works fine
and in the setUp function i would have defined
->registerListeners([ 'name' => [fn() => alert('test')]])
but this never executes
i also tried it through the #[On('name')]
above the function i want to callon the web all i read is to wrap it inside a livewire component but can i still call the component through component::make() inside my applications filament resources
$form->schema([])
call?16 replies