diff --git a/x-pack/legacy/plugins/canvas/canvas_plugin_src/functions/common/saved_lens.ts b/x-pack/legacy/plugins/canvas/canvas_plugin_src/functions/common/saved_lens.ts index 653278117eb77..a307408442fad 100644 --- a/x-pack/legacy/plugins/canvas/canvas_plugin_src/functions/common/saved_lens.ts +++ b/x-pack/legacy/plugins/canvas/canvas_plugin_src/functions/common/saved_lens.ts @@ -15,6 +15,7 @@ import { EmbeddableExpression, } from '../../expression_types'; import { getFunctionHelp } from '../../../i18n'; +import { Filter as DataFilter } from '../../../../../../../src/plugins/data/public'; interface Arguments { id: string; @@ -31,7 +32,7 @@ export type SavedLensInput = EmbeddableInput & { interval: number; }; hideFilterActions: true; - filters: Filter[]; + filters: DataFilter[]; }; const defaultTimeRange = { diff --git a/x-pack/legacy/plugins/canvas/canvas_plugin_src/renderers/embeddable/embeddable_input_to_expression.ts b/x-pack/legacy/plugins/canvas/canvas_plugin_src/renderers/embeddable/embeddable_input_to_expression.ts index 30fb6fc4d3169..6428507b16a0c 100644 --- a/x-pack/legacy/plugins/canvas/canvas_plugin_src/renderers/embeddable/embeddable_input_to_expression.ts +++ b/x-pack/legacy/plugins/canvas/canvas_plugin_src/renderers/embeddable/embeddable_input_to_expression.ts @@ -63,12 +63,6 @@ export function embeddableInputToExpression( `timerange={timerange from="${lensInput.timeRange.from}" to="${lensInput.timeRange.to}"}` ); } - - if (lensInput.hiddenLayers && lensInput.hiddenLayers.length) { - for (const layerId of lensInput.hiddenLayers) { - expressionParts.push(`hideLayer="${layerId}"`); - } - } } return expressionParts.join(' ');