Skip to content

Commit

Permalink
use html title attribute instead of tooltip
Browse files Browse the repository at this point in the history
  • Loading branch information
suddjian committed Aug 10, 2020
1 parent a8db6ca commit 29f1a2d
Showing 1 changed file with 15 additions and 28 deletions.
43 changes: 15 additions & 28 deletions superset-frontend/src/components/TableSelector.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ import FormLabel from 'src/components/FormLabel';
import SupersetAsyncSelect from './AsyncSelect';
import RefreshLabel from './RefreshLabel';
import './TableSelector.less';
import TooltipWrapper from './TooltipWrapper';

const FieldTitle = styled.p`
color: ${({ theme }) => theme.colors.secondary.light2};
Expand Down Expand Up @@ -247,39 +246,27 @@ export default class TableSelector extends React.PureComponent {

renderDatabaseOption(db) {
return (
<TooltipWrapper
placement="top"
label={`${db.database_name}-tooltip`}
tooltip={db.database_name}
>
<span>
<Label bsStyle="default" className="m-r-5">
{db.backend}
</Label>
{db.database_name}
</span>
</TooltipWrapper>
<span title={db.database_name}>
<Label bsStyle="default" className="m-r-5">
{db.backend}
</Label>
{db.database_name}
</span>
);
}

renderTableOption(option) {
return (
<TooltipWrapper
placement="top"
label={`${option.label}-tooltip`}
tooltip={option.label}
>
<span className="TableLabel">
<span className="m-r-5">
<small className="text-muted">
<i
className={`fa fa-${option.type === 'view' ? 'eye' : 'table'}`}
/>
</small>
</span>
{option.label}
<span className="TableLabel" title={option.label}>
<span className="m-r-5">
<small className="text-muted">
<i
className={`fa fa-${option.type === 'view' ? 'eye' : 'table'}`}
/>
</small>
</span>
</TooltipWrapper>
{option.label}
</span>
);
}

Expand Down

0 comments on commit 29f1a2d

Please sign in to comment.