corbinrobb commented on a change in pull request #17386:
URL: https://github.com/apache/superset/pull/17386#discussion_r746938378



##########
File path: superset-frontend/src/SqlLab/components/TableElement/index.tsx
##########
@@ -221,12 +230,15 @@ const TableElement = ({ table, actions, ...props }: 
TableElementProps) => {
     >
       <Tooltip
         id="copy-to-clipboard-tooltip"
-        placement="topLeft"
         style={{ cursor: 'pointer' }}
         title={table.name}
-        trigger={['hover']}
+        trigger={tableNameOverflow ? ['hover'] : []}

Review comment:
       Ohhh, my bad! It wasn't working for me because I left out the check for 
the element not being null and just had the comparison in the const. For some 
reason that doesn't work? Yes, it triggers a rerender, and the ref is updated 
and the comparison is made every time so it works exactly as expected. Very 
cool!
   
   I agree this makes the code a lot simpler and more efficient. I also 
couldn't find anything wrong with doing it this way. I will change it and push 
up those changes shortly. Thanks! 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to