Entangle problem with Table Checkbox state

I’ve built a custom page that includes both a form and a table. The form provides general configuration for the page, and one of its fields is used to update the table’s data. Normally, I’d rely on table filters, but in this case the designer opted for this approach to improve the user experience. The table is populated from an array that I construct and fill via the records method.
return $table
->records(fn (self $livewire) => $livewire->data)
->selectable()
->currentSelectionLivewireProperty('SOME_PROPERTY')
return $table
->records(fn (self $livewire) => $livewire->data)
->selectable()
->currentSelectionLivewireProperty('SOME_PROPERTY')
Now to the issue: When the table data changes, I also need to sync the selected checkbox state. However, the selection state doesn’t update correctly — at least not visually (see my screenshot). I’m using my SOME_PROPERTY to update the selection state. Does anyone know why this might not be working as expected? The screenshot (in German, sorry!) shows that one entry is selected, but in Alpine the state says otherwise.
No description
1 Reply
muesker
mueskerOP2w ago
The problem is that the entanglement is not used for the checkbox state. The checkbox state is connected the the selectedRecord set in alpine and when the entanglement is getting changed from server side the entanglement itself gets the changes but not the selectedRecords variable.

Did you find this page helpful?