diff --git a/x-pack/plugins/maps/common/elasticsearch_util/spatial_filter_utils.ts b/x-pack/plugins/maps/common/elasticsearch_util/spatial_filter_utils.ts index 490a46bc772d3..70df9e9646f50 100644 --- a/x-pack/plugins/maps/common/elasticsearch_util/spatial_filter_utils.ts +++ b/x-pack/plugins/maps/common/elasticsearch_util/spatial_filter_utils.ts @@ -128,6 +128,9 @@ export function createSpatialFilterWithGeometry({ }; } + // Currently no way to create an object with exclude property from index signature + // typescript error for "ignore_unmapped is not assignable to type 'GeoShapeQueryBody'" expected" + // @ts-expect-error return createMultiGeoFieldFilter(geoFieldNames, meta, createGeoFilter); } diff --git a/x-pack/plugins/maps/public/connected_components/toolbar_overlay/index.ts b/x-pack/plugins/maps/public/connected_components/toolbar_overlay/index.ts index a8849b9aff501..7d176c13da049 100644 --- a/x-pack/plugins/maps/public/connected_components/toolbar_overlay/index.ts +++ b/x-pack/plugins/maps/public/connected_components/toolbar_overlay/index.ts @@ -12,9 +12,9 @@ import { ToolbarOverlay } from './toolbar_overlay'; function mapStateToProps(state: MapStoreState) { return { - showToolsControl: getGeoFieldNames(state).length, + showToolsControl: getGeoFieldNames(state).length !== 0, }; } -const connected = connect(mapStateToProps, null)(ToolbarOverlay); +const connected = connect(mapStateToProps)(ToolbarOverlay); export { connected as ToolbarOverlay };