Skip to content

delete elements event #795

Answered by bcakmakoglu
mtksugi asked this question in Q&A
Mar 24, 2023 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

You could use a simple watcher to track the count of your elements.

watch(getElements, (newEls, oldEls) => {
   if (newEls.length !== oldEls.length && newEls.length < oldEls.length) {
      console.log('some element was deleted')
   }
})

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@mtksugi
Comment options

Answer selected by bcakmakoglu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants