I'm trying to manipulate a Vue table. I've multiple filters to filter table's rows.
My filters are actually working, but I've performance issues.
The problem is : when the filter removes rows, everything is fine. But when it adds rows, performance is really dropping down...
I mean, I only have 50 rows, and it takes 2 seconds to display them, from 0 rows to 50 rows...
I think that I missed something...
This is my code
I've one input to filter on name field (this is simplified, I actually have 4 filters), and I filter on the method etdLineDisplayed which is calculated the filter.
This is my template :
<input type="text" v-model="filterRow" class="form-control"/>
<b-table
:items="etdLineDisplayed"
:fields="fields"
>
[...]
</b-table>
And this is where my items are :
computed: {
etdLineDisplayed() {
let itemsFiltered = this.filterRow !== '' ? this.etdLinesData.filter(_ => _.name.includes(this.filterRow.toLowerCase()) : this.allItems;
return itemsFiltered;
}
},