ElCoco
Where to find Filament color styles for default themes
I am integrating my own livewire components into a filment dashboard. I am struggling to find the color classes filaments uses for the default dark and bright themes. All I found in the docs is this:
https://filamentphp.com/docs/3.x/support/colors
Which doesn't link to any default colors (other than the examples)
I am interested in doing something like:
<tr class="{{ $index % 2 === 0 ? 'bg-filament-default' : 'bg-filament-default-highlight' }}">
I tried looking in the vendor folder but I just found gigantic .js files regarding to themes that are hard to make any sense off 😛 I can eye ball the tailwindcss color and use those but would be nice if there is already a bg-class for that.3 replies
Showing notifications as modals
Sometimes I want to ensure that the user gets the notification and acknowledge it. There is a way to open a notification as a modal with just one button "OK"?
If there isn't, can I open a modal on demand? On the filament docs all the modals are highly tied to forms and actions, I couldn't find a way to do something like Filament::ShowModal("My message here", "OK")
I guess I could use a livewire modal, but I want the modal to fit with the look and feel of filament UI out of the box.
11 replies
Sending a form when pressing enter
I have this form:
If I remove the Select component it works as intended, that is, it will send the form when I press enter while focused on the TextInput. But if the Select is present it does nothing. I do not have any validation going on that I am aware off...
Here is my blade:
3 replies
Why this RepeatableEntry code doesn't work as expected
The list shows up properly, but when I click in the action I get:
An attempt was made to evaluate a closure for [Filament\Infolists\Components\Actions\Action], but [$id] was unresolvable.
I am trying to get the value of 'id' in the current component action.
I also tried other stuff like $state or injecting Get and some desperate random stuff...Nothing seems to work.
The only thing that gives sings if working is:
But this gives me an empty array.
5 replies
RepeatableEntry, state array data and suffix actions. How to get the repeatable state in the action.
I have this infolist, $this->conversation->history returns an array (stored as JSON in the DB) :
I need to have the current state of the repeater in the thumbsup/thumbsdown actions. I tried to inject the $state variable and it throws the messsage:
Injecting Get as you see in the example gives:
Someone has any idea of what should I do to get some state out of the repeatable. Actually getting just the INDEX of the array in the repeater loop would already make me pretty happy...
4 replies
Save to DB after deleting a repeater element
I am implementing a ChatGPT-like UI. I use a Repeater to populate the list of conversations. When I press the delete icon it deletes properly the element from the array but I would have to press Submit to save the modified list into the DB. What I want is to save the array immediately after pressing the Delete button (actually this control ideally doesn't even have a submit button).
I played a bit with deleteAction object (https://filamentphp.com/docs/3.x/forms/fields/repeater#customizing-the-repeater-action-objects) but it seems it can just setup the action in specific ways instead of running code after pressing the delete button.
This is my form:
5 replies
Can a suffixAction be triggered by pressing enter?
I have this form in a filament v3 Page:
I was expecting that the suffixAction will also be triggered by pressing the Enter key but is not the case. I could not find any mention to something like this in the Docs. I guess I am missing something very basic here...
5 replies