Skip to content

Commit

Permalink
use native tooltip for the collections tree, avoid preventing the cli…
Browse files Browse the repository at this point in the history
…ck on the upper items (#678)

Signed-off-by: ryjiang <jiangruiyi@gmail.com>
  • Loading branch information
shanghaikid authored Oct 23, 2024
1 parent 4de3d75 commit 72c738d
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions client/src/pages/databases/tree/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,10 @@ const CollectionNode: React.FC<{ data: CollectionObject }> = ({ data }) => {

return (
<div className={classes.collectionNode}>
<div className={classes.collectionName}>
<Tooltip title={data.collection_name} placement="top">
<Typography noWrap className="collectionName">
{data.collection_name}
</Typography>
</Tooltip>
<div className={classes.collectionName} title={data.collection_name}>
<Typography noWrap className="collectionName">
{data.collection_name}
</Typography>
<span className={classes.count}>
({formatNumber(data.rowCount || 0)})
</span>
Expand Down Expand Up @@ -222,12 +220,11 @@ const DatabaseTree: React.FC<DatabaseToolProps> = props => {
<TreeItem
key={tree.id}
itemId={tree.id}
title={tree.name}
label={
<Tooltip title={tree.name}>
<Typography noWrap className={classes.dbName}>
{tree.name}
</Typography>
</Tooltip>
<Typography noWrap className={classes.dbName}>
{tree.name}
</Typography>
}
className={classes.treeItem}
slots={{
Expand Down

0 comments on commit 72c738d

Please sign in to comment.