I’m using vuetify + nuxt to create my web application, how could I apply an animation to a cell if its value changes?
I tried to add a ref to my table element like:
<v-data-table ref="table" :items="data" :headers="headers"/>
and then
$this.$refs.table.$el.addEventListener('change', func)
but nothing happened… anyone can give a light?
2
Answers
Using with vuetify v2:
Table
More than "value" I believe you’re interested in TD cell "textContent" change.
The best would be tap in the function that does the content update.
Otherwise, use MutationObserver on the
childList
property for every TD of a specific table: