diff --git a/src/plugins/vis_type_drilldown/public/components/card_form.tsx b/src/plugins/vis_type_drilldown/public/components/card_form.tsx index 329f06325efe..8df23869db5a 100644 --- a/src/plugins/vis_type_drilldown/public/components/card_form.tsx +++ b/src/plugins/vis_type_drilldown/public/components/card_form.tsx @@ -21,8 +21,8 @@ interface CardFormProps { card: Card; updateCard: (index: number, card: Card) => void; options: any; - activeVisName: string; - handleVisTypeChange: () => void; + valueOfSelected: string; + onChange: () => void; } const CardForm = ({ @@ -35,7 +35,7 @@ const CardForm = ({ }: CardFormProps) => { return ( void; } const DrilldownVisComponent = ({ cards, renderComplete }: DrilldownVisComponentProps) => { useEffect(renderComplete); // renderComplete will be called after each render to signal, that we are done with rendering. + const parsedCardData = JSON.parse(cards); + return ( <> - {cards && - cards.map((card, index) => ( + {parsedCardData && + parsedCardData.map((card: Card, index: number) => ( } diff --git a/src/plugins/vis_type_drilldown/public/to_ast.ts b/src/plugins/vis_type_drilldown/public/to_ast.ts index c7230b1a68cd..b830336b56b0 100644 --- a/src/plugins/vis_type_drilldown/public/to_ast.ts +++ b/src/plugins/vis_type_drilldown/public/to_ast.ts @@ -13,7 +13,7 @@ export const toExpressionAst = (vis: Vis) => { const drilldownVis = buildExpressionFunction( 'drilldownVis', { - cards, + cards: JSON.stringify(cards), } );