title: Send a collection from emit in livewire apparently sends additional information
body: <p>I have a simple dropdown as a livewire component (say component A):</p>
  <pre><code>&lt;select wire:model=&quot;mould_id&quot; wire:change=&quot;$emit('mouldSelected', mould_id)&quot; class=&quot;form-control w-75 float-left&quot;&gt;
      @foreach( $moulds as $mould )
          &lt;option value=&quot;{{ $mould-&gt;id }}&quot;&gt;{{ $mould-&gt;code }}&lt;/option&gt;
      @endforeach
  &lt;/select&gt;
  </code></pre>
  <p>The component's class receives a collection of moulds to display the select, but also, when the <code>mouldsUpdated</code> is fired, the list should be updated. This event should be fired with the list of moulds in another component.</p>
  <pre><code>&lt;?php
  
      namespace App\Http\Livewire\Orders;
  
      use App\Models\Mould;
      use Livewire\Component;
  
      class OrderMouldSelect extends Component{
          public $moulds       = [];
          public $mould_id     = null;
  
          protected $listeners = [
              'mouldsUpdated' =&gt; 'setMoulds',
          ];
  
          /**
           * Sets the component up
           *
           * @param $moulds
           */
          public function mount( $moulds ){
              $this-&gt;setMoulds( $moulds );
          }
  
          /**
           * Sets the list of moulds for the dropdown menu
           *
           * @param $moulds
           */
          public function setMoulds( $moulds ){
              $this-&gt;moulds = $moulds;
          }
  
          /**
           * Displays the mould selector dropdown
           *
           * @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\Contracts\View\View
           */
          public function render(){
              return view( 'livewire.orders.order-mould-select' );
          }
      }
  </code></pre>
  <p>So, in my B component I have a method called <code>FilterMoulds</code>, which applies some filters to the moulds collection and then emits <code>mouldsUpdated</code> with the filtered moulds as a parameter:</p>
  <pre><code>    /**
       * Updates the list of moulds
       */
      public function filterMoulds(){
          $filters                = $this-&gt;filters;
          $this-&gt;moulds           = $this-&gt;family-&gt;moulds-&gt;filter( function( $mould ) use( $filters ){
              ...
              ...
          } );
          $this-&gt;emit( 'mouldsUpdated', $this-&gt;moulds );
      }
  </code></pre>
  <p>This method is launched by a <code>&lt;select&gt;</code> in component's B blade:</p>
  <pre><code>&lt;select class=&quot;form-control&quot; wire:model=&quot;filter_value&quot; wire:change=&quot;setFilter('{{ $characteristic-&gt;parameter-&gt;symbol }}')&quot;&gt;
      &lt;option value=&quot;&quot;&gt;Choose a characteristic&lt;/option&gt;
      @foreach( $characteristic-&gt;data[ 'values'] as $value )
          &lt;option value=&quot;{{ $value }}&quot; @if( array_key_exists( $characteristic-&gt;parameter-&gt;symbol, $filters ) &amp;&amp; ( $filters[ $characteristic-&gt;parameter-&gt;symbol ] == $value ) ) class=&quot;bg-primary&quot; selected @endif&gt;
              {{ $value }} {{ $characteristic-&gt;parameter-&gt;symbol }}
          &lt;/option&gt;
      @endforeach
  &lt;/select&gt;
  </code></pre>
  <p>When I execute the action to filter the moulds I get this error:</p>
  <p><strong>ErrorException
  Trying to get property 'id' of non-object (View: \Path\To\My\Project\resources\views\livewire\orders\order-mould-select.blade.php)</strong></p>
  <p>So I tried die and dump the $moulds variable in <code>setMoulds</code> method and I get this (I will attach an image that explains more the dump):
  <a href="https://i.stack.imgur.com/Jv0Pq.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Jv0Pq.png" alt="In the file you can clearly see that the collection is not the only thing being passed in the $moulds variable" /></a></p>