Quadrubo
How to set the default modal action when clicking a row
Is it possible to set the default action when clicking a row to
edit
? I know this is possible by overwriting the recordUrl()
function of the table. That however always opens a new page. I want to utilize the modals that are being used when no recordUrl is passed.
Code:
Thanks :)3 replies
Livewire lifecycle hooks not working in nested widget
Hey, I don't know if this is a filament specific or a livewire thing but I though I'd also ask here.
Hey, I have 2 livewire components. One is called
Map
and has the property $filters
. It is a filament page. The other is called MapWidget
and get's the property from the Map
component. It is a filament widget. Now I want to call code when the $filters
property of the child component MapWidget
updates. However the hooks don't seem to fire.
Map:
MapWidget
When putting the updated
function into the parent component it works as expected. I can also see that the data changes when I echo it in the view. The only thing not working are these hooks.1 replies
Form in custom field?
Is it possible to have a form inside a custom field? I'm creating a custom field in which I would like to use a filament select in combination with a leaflet map.
How would one go about that?
Adding the
use Filament\Forms\Concerns\InteractsWithForms;
trait to my Field breaks the site.4 replies
Wire click broken in render hook
How do I make
wire:click
work when rendering a view from my render hook? This is a minimal example:
view:
component:
service provider:
The test()
function is never called. The console doesn't display anything. It seems to me like wire:click
is not doing anything.5 replies
change background colour of a textinput conditionally
Hello, i want to change the background color of a textinput. I got it working using extra attributes. However only "bg-primary-500" seems to work. I want "bg-danger-500". Any way to prevent those classes from being purged?
4 replies
Static property state does not persist
I don't know if this is a general PHP thing or has got to do with the way Filament works or I'm doing something wrong but somehow the state doesn't persist.
I'm setting a static property in the
getSearchResultsUsing()
function and afterwards retrieve that property in the afterStateUpdated()
function but it errors with the message "must not be accessed before initialization".
What is happening here? What can I do to save data between the functions or am I doing something completely wrong conceptually. Thanks in advance!6 replies
Fill form from within resource
which function does filament use to fill it's form on a resource? I wanna fill the form with model data without actually attaching a model to the form, kinda like cloning a model if that makes sense
I see that the fillForm method is available on the EditRecord and the ViewRecord class. I want to use it from the resource, e.g. when a select is changed, refill the data depending on the select entry.
I know I could use Closure customization but that would lead to a lot of work as I want to implement this functionality across different models with different attributes.
2 replies
Can't set DatePicker as required
Hello,
I'm using the Form Builder on a custom Widget of mine. I can't set the DatePicker as required, a TextInput or a Select works as usual. When I click submit without filling the textinput the field says it's required, on the datepicker this doesn't happen.
5 replies
Is it possible to use the Table builder without a Query?
I'd want to use the table builder without using a Query. I have my own data defined as an array or really anything I want to and want to render that as a table, I'd also be fine with using some kind of table component in livewire, it would be for viewing only. Right now I have to implement the
getTableQuery
method which I don't have.7 replies
How to make my method execute a Closure
Hello,
I'm writing a custom function inside my action which should accept a Closure.
Right now this gives the error,
Object of class Closure could not be converted to string
. Looking at other methods I couldn't find a difference, how do you do this?5 replies
Autofill fields from url
hey, is there a way to autofill fileds from the url?
I have created this action which links to the Create Page of a resource, I want to have a few fields prefilled, depending on the action.
Here is what i tried, want to fill the field named iban with the value DE90BLABLA
12 replies