I am currently utilizing lodash's sortBy function in my code. Below is how it looks:
import { sortBy } from 'lodash.sortby';
computed: {
visibleInsights() {
return sortBy(this.insights.filter(insight => {
const id = this.getInsightId(insight);
return !this.hiddenInsights.includes(id);
}), ['insightType.attribute']);
},
},
https://i.sstatic.net/YsG0I.jpg
I'm attempting to sort the data before rendering, however, I'm encountering an error with this method. Is there a different approach to tackle this issue? The provided code snippet represents my current attempt.