ChrisR
How to know when a modal, opened via a Table action, has been closed?
I tried this, but I get the same result:
The
Action
that I'm using here is Filament\Tables\Actions\Action
. I'm getting a little confused because StaticAction
, from what I can tell, is the only class that uses the CanClose
trait, but maybe my IDE is failing me here.9 replies
Modal submit action button is white text on white background - I can't figure out how to change that
You're right - I added the action to an existing Resource that I have, OrderResource, and the color is correct. I'll have to just make this work and then come back to why it wasn't working in a custom LW component. Thank you for your help!
20 replies
Modal submit action button is white text on white background - I can't figure out how to change that
Something is telling me that I've botched this up, though.
I would expect this code to be executed when either the submit or cancel button on the modal is clicked: However, it is executed when I click "Scan items", i.e. the element that opens the modal - both the submit and cancel
I would expect this code to be executed when either the submit or cancel button on the modal is clicked: However, it is executed when I click "Scan items", i.e. the element that opens the modal - both the submit and cancel
20 replies
Modal submit action button is white text on white background - I can't figure out how to change that
It's possible, but I haven't worked on this app in awhile until this week. I think it's mostly stock. I even tried to add a custom color to my tailwind.config.css:
That broke things with this error:
[vite] Internal server error: [postcss] /app/resources/css/app.css:1:1: 'colors.gray.400' does not exist in your theme config. 'colors' has the following keys: 'red'
20 replies
How to execute javascript within a modal
Thanks, I'll take a look at that as well. Right now I at least have my JS firing with a combo of:
component blade file:
<div class="wrapper flex flex-col" wire:init="initScanner">
component class:
js
I have no idea if this is the best way to do this yet. I'm still trying to figure out the relationship between Filament, Livewire, and Alpine and knowing when to use what where 🙂8 replies
How to execute javascript within a modal
It seems as if
wire:init
is intended for calling actions - I don't see how that would allow me to execute JS in a modal - am I missing your meaning?
That did lead me to https://livewire.laravel.com/docs/javascript but when I do something simple like:
It just renders @script @endscript
and never logs.8 replies
Having trouble figuring out best way to add a button to a modal, which triggers custom JS
Ok, thanks; I'll dig into Alpine. I was just reading through https://filamentphp.com/docs/3.x/forms/adding-a-form-to-a-livewire-component and wondering if I need a livewire component that has a Filament form, which is displayed in a modal. I'm probably way over-complicating it as a result of not understanding everything I have at my disposal
10 replies