fblaser
fblaser
FFilament
Created by fblaser on 1/22/2024 in #❓┊help
Select option is "0" after creating an entry through Select::make(...)->createOptionForm(...)
Looking at the code, it looks like the working solution I found was to set the value of the select manually using the afterStateUpdated callback.
7 replies
FFilament
Created by fblaser on 1/22/2024 in #❓┊help
Select option is "0" after creating an entry through Select::make(...)->createOptionForm(...)
Hi @Adapt.Patrick, looks a bit similar indeed.
7 replies
FFilament
Created by fblaser on 1/22/2024 in #❓┊help
Select option is "0" after creating an entry through Select::make(...)->createOptionForm(...)
This is probably, not relevant, but the Select component is located inside a Wizard.
7 replies
FFilament
Created by brunomedeiros13 on 1/21/2024 in #❓┊help
After save a record, how i call a action?
You can use the ->after(..) hook on your EditAction
EditAction::make("...")
->after(function () {
// Runs after the form fields are saved to the database.
})
EditAction::make("...")
->after(function () {
// Runs after the form fields are saved to the database.
})
Full documentation is here: https://filamentphp.com/docs/3.x/actions/prebuilt-actions/edit#lifecycle-hooks
3 replies
FFilament
Created by fblaser on 8/2/2023 in #❓┊help
Table action to open url in new tab (asynchronous)
Thanks for the reply @awcodes. The login url changes on every call, unfortunately. The API creates a session on the control panel, and the link allows for a passwordless sign-in, so it better be somewhat random 😉 In the meantime, I've managed to get my old solution working, by making sure livewire is initialised before listening for the event:
document.addEventListener('livewire:initialized', () => {
Livewire.on('openInNewTab', url => {
window.open(url, '_blank');
})
})
document.addEventListener('livewire:initialized', () => {
Livewire.on('openInNewTab', url => {
window.open(url, '_blank');
})
})
This works, but feels hacky...
6 replies