BulkAction not getting data from modal submit

I have a table of facture, my bulk action should open a modal displaying a table where user can select for each $row which one of the associated files whants to download.

                BulkAction::make('Descargar Documentos')
                    ->icon('heroicon-m-arrow-down')
                    ->action(function ($records, array $data){ 
                        //Code for navigate modal response and create zip file
                    })
                    ->modalContent(function ($records) {
                        return new HtmlString(
                            Blade::render('livewire.balance.download-documents-table', [
                                'records' => $records,
                            ])
                        );
                    })
                    ->modalHeading('Descargar documentos')
                    ->modalSubmitActionLabel('OK')
                    ->modalCancelActionLabel('Cancelar'),

How can I access the downloadForm data in the action to create the zip. Thanks in advance.
Was this page helpful?