V-model and v-for becomes slow when dealing with large datasets. #9677
Unanswered
Kokleng-Dev
asked this question in
Help/Questions
Replies: 2 comments 3 replies
-
|
Beta Was this translation helpful? Give feedback.
1 reply
-
It's not straightforward to give a real solution without runnable code, and I'm a bit suprised 30 elements are causing an issue. But <tr v-for="(item,index) in items" :key="item.id" v-memo="[item.price, item.name, ....]">
<td> .... </td>
<td>
<input type="number" step="0.01" v-model="item.price" class="form-control">
</td>
...... more td + input with v-model
</tr> Be sure to read the docs for |
Beta Was this translation helpful? Give feedback.
2 replies
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.
-
"The v-for directive becomes slow when dealing with large datasets. Note: My data is local, not from an API. I have only one button that, when clicked, adds new data to the 'items' array. Within the loop, there are five inputs that work with v-model. After clicking the 'add item' button more than 30 times, the pre-rendering process becomes noticeably slow. Please help me. Here is my example code below:"
Beta Was this translation helpful? Give feedback.
All reactions