diff --git a/src/plugins/vis_type_timeseries/public/application/components/aggs/filter_ratio.js b/src/plugins/vis_type_timeseries/public/application/components/aggs/filter_ratio.js index 14851d1c964f..4286af7fd640 100644 --- a/src/plugins/vis_type_timeseries/public/application/components/aggs/filter_ratio.js +++ b/src/plugins/vis_type_timeseries/public/application/components/aggs/filter_ratio.js @@ -54,9 +54,13 @@ export const FilterRatioAgg = (props) => { props.onChange, ]); const handleSelectChange = createSelectHandler(handleChange); - const handleQueryChange = useCallback((name, value) => handleChange({ [name]: value }), [ + const handleNumeratorQueryChange = useCallback((query) => handleChange({ numerator: query }), [ handleChange, ]); + const handleDenominatorQueryChange = useCallback( + (query) => handleChange({ denominator: query }), + [handleChange] + ); const indexPattern = (series.override_index_pattern && series.series_index_pattern) || panel.index_pattern; @@ -108,7 +112,7 @@ export const FilterRatioAgg = (props) => { > handleQueryChange('numerator', query)} + onChange={handleNumeratorQueryChange} indexPatterns={[indexPattern]} /> @@ -126,7 +130,7 @@ export const FilterRatioAgg = (props) => { > handleQueryChange('denominator', query)} + onChange={handleDenominatorQueryChange} indexPatterns={[indexPattern]} />