How to make entangle work properly with an array?

When I use entangle on a public property that is an array, changes to the javascript object are not syncing with the public property on the livewire component. If I do a console.log on the javascript object, instead of an array I see a Proxy object that seems to reflect my changes properly, but doesn’t actually make the changes on the frontend.

Not sure why i’m seeing a Proxy here instead of Array, and how I can force it to update livewire with the changes.

Here is my code for this component: (the html)

<div x-data="{ selected: @entangle('selected'), notSelected: @entangle('notSelected') }">
    <label for="selected">Selected</label>
    <select id='selected' class="bg-white rounded h-40 p-1 block w-full" multiple>
        @foreach($selected as $value)
            <option>{{$value}}</option>
        @endforeach
    </select>

    <div class="w-full border-t-2 border-primary-400 pt-4 mt-8"></div>

    <label for="not-selected">Not Selected</label>
    <select id='not-selected' class="bg-white rounded h-40 p-1 block w-full" multiple>
        @foreach($notSelected as $value)
            <option @click="selected.push(notSelected.splice(notSelected.indexOf($event.target.value), 1)); console.log(selected)">{{$value}}</option>
        @endforeach
    </select>
</div>

And the code of the component:

public $selected = [];

public $notSelected = ['1', '2', '3', '4', '5'];

public function render()
{
    return view('livewire.dual-list-box');
}

Essentially when I click on a “notSelected” it should remove that entry from the array, and add it to the selected array instead. If everything were working properly with entangle, I would expect a request to be made and for the component to re-render the list boxes with the changes.

but changing the selected and notSelected javascript arrays doesn’t result in any updates to the frontend…

Also: I realize I can just use livewire to update those values on the backend, but I’d rather modify the javascript arrays and use .defer to notify livewire at the last minute (when the page is submitted)

I made an issue since I think this is a bug: https://github.com/livewire/livewire/issues/1682

here is a laravel playground setup showing the problem…