Filament 3 Tabs Serving Livewire Component with $form

I have an OrdersResource using Filament 3 Tabs to serve a Livewire component OrderProofs which allows for uploading an image and storing in the Proofs table that separate from the parent Orders table. The logic works well except that when uploading a file the parent 'Save Changes' button is triggered into 'Uploading file...' status, and never returns from that state. Is there a way I can better isolate the Livewire form so it never triggers the parent Save Changes button? Have tried using different layers of components along with modals but cannot seem to solve for this...
No description
3 Replies
divStrong
divStrongOP6d ago
Here is the full OrderProofs code:
divStrong
divStrongOP6d ago
And it is being served in a Tab like this: Tabs\Tab::make('Proofs') ->icon('heroicon-o-document-magnifying-glass') ->schema([ $form->model && (is_array($form->model) || is_object($form->model)) ? Livewire::make(OrderProofs::class, ['orderId' => $form->model->id])->key('order-proofs')->extraAttributes(['wire:ignore' => true]) : Placeholder::make('notes_placeholder') ->label('No proofs yet'), ]),
toeknee
toeknee6d ago
It will be how you are handling the file upload, we are never getting a success back so it's pending. You want that to show that, otherwise people will submit the form ebfore the files have fully uploaded. Why not use Spatie Media and store in a collection 'proofs' It'll be related and fully supported without anything custom?

Did you find this page helpful?