wire:keydown call alpine method

I see I can use etraInputAttributes to add wire:keydown.enter to an input. The method provided there will call a component method in livewire, but what if I want to call a javascript method on the alpine component? Is there a way to do that?
TextInput::make('description')
->placeholder('Enter a description')
->extraInputAttributes(['wire:keydown.enter' => 'startTimer']),
TextInput::make('description')
->placeholder('Enter a description')
->extraInputAttributes(['wire:keydown.enter' => 'startTimer']),
Solution:
Using x-on:keydown.enter instead of wire:
Jump to solution
2 Replies
Solution
Dennis Koch
Dennis Koch3mo ago
Using x-on:keydown.enter instead of wire:
Jon Mason
Jon MasonOP3mo ago
duh...thanks.
Want results from more Discord servers?
Add your server