diff --git a/x-pack/legacy/plugins/maps/public/layers/sources/es_search_source/update_source_editor.js b/x-pack/legacy/plugins/maps/public/layers/sources/es_search_source/update_source_editor.js index 332b0027796b4..7b9ae98d31e8e 100644 --- a/x-pack/legacy/plugins/maps/public/layers/sources/es_search_source/update_source_editor.js +++ b/x-pack/legacy/plugins/maps/public/layers/sources/es_search_source/update_source_editor.js @@ -191,6 +191,23 @@ export class UpdateSourceEditor extends Component { } render() { + let topHitsCheckbox; + if (this.state.dateFields && this.state.dateFields.length) { + topHitsCheckbox = ( + + + + ); + } + return ( - - - + {topHitsCheckbox} {this.renderTopHitsForm()}