Calling a livewire method via the blur event (javascript)

I need to call a livewire event when I lose focus (blur).
How could I do this?

When I exit an input I want to save the text.

Hey, @mflorindo

You can do something like this:

<input id="name" type="text"/>

  let input = document.getElementById('name');

 input.addEventListener('blur', () => {

PS: I don’t test this code, it may a typo in it or something.

I think you can use wire:model.lazy=input” and in the component you can use updatedInput and do the logic there