From fddf019575f4e22aced1ef1f262d8b499d0e8da7 Mon Sep 17 00:00:00 2001 From: sulemanof Date: Tue, 22 Sep 2020 15:45:38 +0300 Subject: [PATCH] Use common no data message --- .../vis_type_tagcloud/public/tag_cloud_type.ts | 1 - .../public/tag_cloud_vis_renderer.tsx | 3 ++- .../public/components/visualization_container.tsx | 12 +++++++++--- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/plugins/vis_type_tagcloud/public/tag_cloud_type.ts b/src/plugins/vis_type_tagcloud/public/tag_cloud_type.ts index 114ca5cdb0e34..d4c37649f949d 100644 --- a/src/plugins/vis_type_tagcloud/public/tag_cloud_type.ts +++ b/src/plugins/vis_type_tagcloud/public/tag_cloud_type.ts @@ -120,5 +120,4 @@ export const tagCloudVisTypeDefinition = { }, ]), }, - useCustomNoDataScreen: true, }; diff --git a/src/plugins/vis_type_tagcloud/public/tag_cloud_vis_renderer.tsx b/src/plugins/vis_type_tagcloud/public/tag_cloud_vis_renderer.tsx index f8761fb445a99..4cc1542e0b3c0 100644 --- a/src/plugins/vis_type_tagcloud/public/tag_cloud_vis_renderer.tsx +++ b/src/plugins/vis_type_tagcloud/public/tag_cloud_vis_renderer.tsx @@ -20,6 +20,7 @@ import React, { lazy, Suspense } from 'react'; import { render, unmountComponentAtNode } from 'react-dom'; import { EuiLoadingSpinner } from '@elastic/eui'; +import { get } from 'lodash'; import { VisualizationContainer } from '../../visualizations/public'; import { ExpressionRenderDefinition } from '../../expressions/common/expression_renderers'; @@ -41,7 +42,7 @@ export const getTagCloudVisRenderer: ( }); render( - + }> { - const classes = `visualization ${props.className}`; - return
{props.children}
; +export const VisualizationContainer = ({ + className = '', + children, + showNoResults = false, +}: VisualizationContainerProps) => { + const classes = `visualization ${className}`; + return
{showNoResults ? : children}
; };