diff --git a/superset-frontend/src/explore/components/controls/DatasourceControl.jsx b/superset-frontend/src/explore/components/controls/DatasourceControl.jsx index 94b8ddc018f6b..88e804da185b3 100644 --- a/superset-frontend/src/explore/components/controls/DatasourceControl.jsx +++ b/superset-frontend/src/explore/components/controls/DatasourceControl.jsx @@ -157,6 +157,7 @@ class DatasourceControl extends React.PureComponent { render() { const { showChangeDatasourceModal, showEditDatasourceModal } = this.state; const { datasource, onChange } = this.props; + const isMissingDatasource = datasource; const datasourceMenu = ( {this.props.isEditable && ( @@ -176,7 +177,7 @@ class DatasourceControl extends React.PureComponent {
{/* Add a tooltip only for long dataset names */} - {datasource.name.length > 20 ? ( + {!isMissingDatasource && datasource.name.length > 25 ? ( {datasource.name} @@ -208,7 +209,7 @@ class DatasourceControl extends React.PureComponent {
{/* missing dataset */} - {datasource.id == null && ( + {isMissingDatasource && (