How to trigger a click event on 'next' button click in Wizard Step form.

I am using Action on table. Inside the Action I am using Wizard Steps. In my first Step using a Livewire component to create table like form.
Now by default I have 'Next' in Step 1 to goto in Step 2.
I would like to trigger a click event on click of this button Next button.
Any idea please help.
Wizard::make()
     ->steps([
              Step::make('Select Channels')
           ->schema([
                    TextInput::make('search')
                        ->label('Search Channels')
                        ->placeholder('Search channels...')
                        ->reactive()
                        ->afterStateUpdated(function ($state, $get, $set) {
                                $set('search', $state);                   
                        }),
                            
                    Forms\Components\View::make('livewire-channel-table')
                        ->afterStateUpdated(function ($state, $get, $set) {
                            $set('selectedChannels', $state['selectedChannels'] ?? []);
                        })
                        ->extraAttributes(['wire:ignore' => true]), 
                        ]),
                        
            Step::make('Another Step')
            // More code continued...
Model_Table.png
Was this page helpful?