AlpineJS adapter #6043
Unanswered
marceloverdijk
asked this question in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I was experimenting creating a AlpineJS adapter like:
It uses
Alpine.reactive
to make the state reactive.and then on page create the table:
and in the html:
this nicely renders the table, and when clicking the header I see the internal sort is updated as well using the console.log.
However the table on the page is not sorted then, and it makes sense, as the table itself is not updated, and hence AlpineJS won't know it needs to be updated.
I wonder if somebody already did something similar, or anybody has some pointers if this could work with AlpineJS?
How to make AlpinJS re-render the table if the state changes...
Looking at Vue adapter source code I see the merge-proxy code and I wonder if something like that is needed (but honestly I don't know exactly what it does)... /cc @Mokshit06 @OlaAlsaker
Beta Was this translation helpful? Give feedback.
All reactions