We're using primevue datatable to display large amounts of data, and offer the user to toggle columns as described in documentation. We have noted that it requires a considerable amount of time to toggle columns (sometimes up to 5 seconds). When we took a closer look at the code, we noticed that this is a very expensive / inefficient way of doing it:
Code: Select all
// ....
methods: {
onToggle(value) {
this.selectedColumns = this.columns.filter(col => value.includes(col));
}
}
Keep up the good work