import { EuiEmptyPrompt , EuiText } from '@elastic/eui' ; import { i18n } from '@kbn/i18n' ; import React from 'react' ; interface VisualizationNoResultsProps { onInit ? : ( ) => void ; } export class VisualizationNoResults extends React . Component < VisualizationNoResultsProps > { public render ( ) { return ( < div data - test - subj = "visNoResult" className = "visError" > < EuiEmptyPrompt iconType = "visualizeApp" iconColor = "default" data - test - subj = "visualization-error" body = { < EuiText size = "xs" > { i18n . translate ( 'visualizations.noResultsFoundTitle' , { defaultMessage : 'No results found' , } ) } < /EuiText>}/ > < /div>); } public componentDidMount ( ) { this . afterRender ( ) ; } public componentDidUpdate ( ) { this . afterRender ( ) ; } private afterRender ( ) { if ( this . props . onInit ) { this . props . onInit ( ) ; } } } export default VisualizationNoResults ;