charlie
How can I check for any unsaved changes in the edit form?
wire:dirty
is a livewire directive:
https://livewire.laravel.com/docs/wire-dirty
And you should replace enabled-class
with any css class you want28 replies
Won't Work the defaultItems(1) on Repeater
Your code seems right, but it won't work when you edit record, only when you create one, because when you edit the record it will fetch repeater data from db and if it's null, the empty repeater won't show. (like Dennis said)
However it should have one default empty item on create record page.
8 replies
How to handle the deleteAction for the file-upload field
It is the responsibility of the developer to delete these files from the disk if they are removed, as Filament is unaware if they are depended on elsewhere. One way to do this automatically is observing a model event.From the docs here: https://filamentphp.com/docs/3.x/forms/fields/file-upload#configuring-the-storage-disk-and-directory Here is how you could do it in a table for example:
3 replies
table row background color & clear all filters button
ok. I mean if you don't sort, you can do it with simple CSS but only for the first 4.
But for the last four it's not possible in CSS because of pagination.
However, you could do that on php side with
recordClasses
:
9 replies
header action opens a create modal, followed by a confirmation modal
You can chain actions with
replaceMountedAction()
https://filamentphp.com/docs/3.x/actions/adding-an-action-to-a-livewire-component#chaining-actions13 replies
Auto set minutes to 00 when an hour is set with native TimePicker
According to this SO comment, this is not possible because the field doesn't even have a value when it's partially filled.
https://stackoverflow.com/a/58669146
6 replies