Livewire wire:model.defer shows null value on submit (on second time)

Viewed 566

this is my blade view example

<x-jet-form-section submit="store">
    <div class="col-span-6 sm:col-span-4">
                <x-jet-label for="name" value="{{ __('Name') }}" />
                <x-jet-input name="name" wire:model.defer="name" type="text" class="mt-1 block w-full" autocomplete="off" />
                <x-jet-input-error for="name" class="mt-2" />
            </div>
</x-jet-form-section>

on LiveWire Component I have this debug

public function store() {
  dd($this);
}

when i submit the form I see the input field value. Then i close the debug windod (dd) press submit again and now the value is NULL.

If I change wire:model.defer to wire:model.lazy this not happend again. it works. why ?!

0 Answers
Related