Skip to content

Commit

Permalink
Respect maxColumns exposed by the metric box configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
abollini committed Jun 2, 2021
1 parent bbb9913 commit 91e3852
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/app/core/layout/metrics-components-data.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,10 @@ export class MetricsComponentsDataService {
* Get matching metrics for item.
*/
getMatchingMetrics(metrics: Metric[], maxColumn: number, metricTypes: string[]): MetricRow[] {

const metricRows = this.computeMetricsRows(metrics, 3, metricTypes);
if (maxColumn == null || maxColumn <= 0) {
maxColumn = 3;
}
const metricRows = this.computeMetricsRows(metrics, maxColumn, metricTypes);

return metricRows;
}
Expand Down

0 comments on commit 91e3852

Please sign in to comment.