@@ -15,6 +15,7 @@ import { i18n } from '@kbn/i18n';
1515import { JoinExpression } from './join_expression' ;
1616import { MetricsExpression } from './metrics_expression' ;
1717import { WhereExpression } from './where_expression' ;
18+ import { GlobalFilterCheckbox } from '../../../../components/global_filter_checkbox' ;
1819
1920import {
2021 indexPatternService ,
@@ -168,6 +169,16 @@ export class Join extends Component {
168169 } ) ;
169170 }
170171
172+ _onApplyGlobalQueryChange = applyGlobalQuery => {
173+ this . props . onChange ( {
174+ leftField : this . props . join . leftField ,
175+ right : {
176+ ...this . props . join . right ,
177+ applyGlobalQuery,
178+ } ,
179+ } ) ;
180+ }
181+
171182 render ( ) {
172183 const {
173184 join,
@@ -184,6 +195,7 @@ export class Join extends Component {
184195 const isJoinConfigComplete = join . leftField && right . indexPatternId && right . term ;
185196
186197 let metricsExpression ;
198+ let globalFilterCheckbox ;
187199 if ( isJoinConfigComplete ) {
188200 metricsExpression = (
189201 < EuiFlexItem grow = { false } >
@@ -194,6 +206,15 @@ export class Join extends Component {
194206 />
195207 </ EuiFlexItem >
196208 ) ;
209+ globalFilterCheckbox = (
210+ < GlobalFilterCheckbox
211+ applyGlobalQuery = { right . applyGlobalQuery }
212+ setApplyGlobalQuery = { this . _onApplyGlobalQueryChange }
213+ customLabel = { i18n . translate ( 'xpack.maps.layerPanel.join.applyGlobalQueryCheckboxLabel' , {
214+ defaultMessage : `Apply global filter to join` ,
215+ } ) }
216+ />
217+ ) ;
197218 }
198219
199220 let whereExpression ;
@@ -234,6 +255,8 @@ export class Join extends Component {
234255
235256 { whereExpression }
236257
258+ { globalFilterCheckbox }
259+
237260 < EuiButtonIcon
238261 className = "mapJoinItem__delete"
239262 iconType = "trash"
0 commit comments