Answer the question
In order to leave comments, you need to log in
How to call a directive after DOM update in VUE js?
Hello.
I'm trying to implement a list with sorted elements.
So I get a list from the server
this.$http.get('api/pageslist')...
<ul v-sortable>
<li>Item 1</li>
<li>Item 2</li>
</ul>
directives: {
sortable: {
bind () {
console.log('yes')
}
}
}
Answer the question
In order to leave comments, you need to log in
Directives have hooks ( https://ru.vuejs.org/v2/guide/custom-directive.htm... ) that fire on certain events, including when elements and components are updated.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question