View column javascript
Any good pointers for using Javascript / Livewire inside a view column?
ie. this:
Vanilla JS to keep it simple:
This works on the first page, but when you navigate to second page in your listing, it will not have the function defined and it won't work. Any pointers from here?
Solution:Jump to solution
I ended up solving this in the following way:
this to table definition:
This as a separate function:...
1 Reply
Solution
I ended up solving this in the following way:
this to table definition:
This as a separate function:
And inside the view file I have just plain vanilla JS.
I still wonder though whether there is a more elegant way to handle this, but at least this works.