diff --git a/x-pack/legacy/plugins/maps/public/components/global_filter_checkbox.js b/x-pack/legacy/plugins/maps/public/components/global_filter_checkbox.js index 8694fd0451238..e841fa573c9a5 100644 --- a/x-pack/legacy/plugins/maps/public/components/global_filter_checkbox.js +++ b/x-pack/legacy/plugins/maps/public/components/global_filter_checkbox.js @@ -8,7 +8,11 @@ import React from 'react'; import { EuiFormRow, EuiSwitch } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; -export function GlobalFilterCheckbox({ applyGlobalQuery, setApplyGlobalQuery }) { +const label = i18n.translate('xpack.maps.layerPanel.applyGlobalQueryCheckboxLabel', { + defaultMessage: `Apply global filter to source`, +}); + +export function GlobalFilterCheckbox({ applyGlobalQuery, customLabel, setApplyGlobalQuery }) { const onApplyGlobalQueryChange = event => { setApplyGlobalQuery(event.target.checked); }; @@ -18,9 +22,7 @@ export function GlobalFilterCheckbox({ applyGlobalQuery, setApplyGlobalQuery }) display="columnCompressedSwitch" > { + this.props.onChange({ + leftField: this.props.join.leftField, + right: { + ...this.props.join.right, + applyGlobalQuery, + }, + }); + } + render() { const { join, @@ -184,6 +195,7 @@ export class Join extends Component { const isJoinConfigComplete = join.leftField && right.indexPatternId && right.term; let metricsExpression; + let globalFilterCheckbox; if (isJoinConfigComplete) { metricsExpression = ( @@ -194,6 +206,15 @@ export class Join extends Component { /> ); + globalFilterCheckbox = ( + + ); } let whereExpression; @@ -234,6 +255,8 @@ export class Join extends Component { {whereExpression} + {globalFilterCheckbox} +