diff --git a/wherehows-web/app/components/datasets/health/metrics-charts.ts b/wherehows-web/app/components/datasets/health/metrics-charts.ts index 65a0971257..4f73a63135 100644 --- a/wherehows-web/app/components/datasets/health/metrics-charts.ts +++ b/wherehows-web/app/components/datasets/health/metrics-charts.ts @@ -1,6 +1,6 @@ import Component from '@ember/component'; import { IChartDatum } from 'wherehows-web/typings/app/visualization/charts'; -import { set } from '@ember/object'; +import { setProperties } from '@ember/object'; import { noop } from 'wherehows-web/utils/helpers/functions'; export default class DatasetsHealthMetricsCharts extends Component { @@ -15,11 +15,21 @@ export default class DatasetsHealthMetricsCharts extends Component { * a filter, triggered when the user clicks on one of the bars of the bar chart. * @param {IChartDatum} datum - the actual chart datum object so we know what was clicked */ - onFilterSelect: (datum: IChartDatum) => void; + onCategorySelect: (datum: IChartDatum) => void; + + /** + * Pass through function meant to come from the dataset-health container that handles the selection of + * a filter, triggered when the user clicks on one of the bars of the bar chart. + * @param {IChartDatum} datum - the actual chart datum object so we know what was clicked + */ + onSeveritySelect: (datum: IChartDatum) => void; constructor() { super(...arguments); - set(this, 'onFilterSelect', this.onFilterSelect || noop); + setProperties(this, { + onCategorySelect: this.onCategorySelect || noop, + onSeveritySelect: this.onSeveritySelect || noop + }); } }