On Laravel 11 / Livewire 3 site I have an input and button clicking on which modal is opened :
<div class="flex max-h-10 p-0 m-0">
<div class="p-0 w-full m-0">
<input id="text" name="text" type="text"
class="editor_form_input"
maxlength="255"
wire:model.live.change="noteText"
autocomplete="off"
placeholder="Fill string text "
/>
</div>
<div class="w-16 align-items-end justify-end align-top m-0 p-1">
<button
wire:click="$dispatch('openModal', { component: 'my-modal', arguments: {noteId: {{ $noteId }}, noteText: '{{ $noteText }}'} })">
Open
</button>
</div>
</div>
$noteText – is public var defined in my component and opening modal I need to pass this var to modal.
It works OK if editing text I click out of input firstly (or click tab). But if I click at button at once, the newly entered text is not passed. How can I fix it ?
"laravel/framework": "^11.9",
"livewire/livewire": "^3.5",
"wire-elements/modal": "^2.0"