Refactor groupData in Embed component
In the <Embed>
component, we have the following function:
groupData() {
const groupsWithData = this.groups.filter(group => this.chartsWithData(group.metrics).length);
if (groupsWithData.length) {
return groupsWithData[0];
}
return null;
This can probably be refactored using a vuex getter.
This comes from a discussion in !31644 (merged):
-
@psimyn started a discussion: (+1 comment) todo: does this ever need more than 1 group? if not this could be vuex getter