title: Livewire simple dropdown and save button with model property binding
body: <p>In my view I have:</p>
  <pre><code>&lt;form wire:submit.prevent=&quot;save&quot;&gt;
  
      &lt;select wire:model.defer=&quot;post.is_public&quot;&gt;
          &lt;option value=&quot;0&quot;&gt;No&lt;/option&gt;
          &lt;option value=&quot;1&quot;&gt;Yes&lt;/option&gt;
      &lt;/select&gt;
  
      &lt;button type=&quot;submit&quot;&gt;
          Submit
      &lt;/button&gt;
      
  &lt;/form&gt;
  </code></pre>
  <p>And in the component:</p>
  <pre><code>&lt;?php
  
  namespace App\Http\Livewire;
  
  use Livewire\Component;
  use App\Models\Post;
  
  class PostPublicToggle extends Component
  {
      public Post $post;
  
      protected $rules = [
          'post.is_public' =&gt; 'boolean'
      ];
  
      public function render()
      {
          return view('livewire.post-public-toggle');
      }
  
      public function save()
      {
          $this-&gt;validate();
          $this-&gt;post-&gt;save();
      }
  }
  </code></pre>
  <p>First I wanted this to work without a submit button (auto-submit on select change). But that didn't work so that's why I added <code>.defer</code> and a submit button.</p>
  <p>Now when I press submit, I can see in the XHR request that <code>post.is_public = null</code> and I don't understand why.</p>