Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

sohrabsaboori's avatar

Alphine JS missing item when paginating

I manipulated a table with livewire and use alpine js to get some info from the table. when I use @click, when press on paginate to the next page I got this error

Uncaught (in promise) DOMException: Failed to execute 'setAttribute' on 'Element': '@click' is not a valid attribute name.

I fixed this problem by using x-on:click instead of @click but now the problem is that for example, I have 100 items on page one when I log the key in alpine js state it works fine but when I paginate to page 2, although the code is changed correctly alpine still get the same index of page 1,(if I click on item 199 it shows item 99)

https://i.stack.imgur.com/JKCys.png https://i.stack.imgur.com/By5BX.png https://i.stack.imgur.com/QADbT.png https://i.stack.imgur.com/J5C71.png

0 likes
0 replies

Please or to participate in this conversation.