eschutho commented on a change in pull request #17386:
URL: https://github.com/apache/superset/pull/17386#discussion_r746160545
##########
File path: superset-frontend/src/SqlLab/components/TableElement/index.tsx
##########
@@ -77,6 +77,15 @@ const Fade = styled.div`
const TableElement = ({ table, actions, ...props }: TableElementProps) => {
const [sortColumns, setSortColumns] = useState(false);
const [hovered, setHovered] = useState(false);
+ const [tableNameOverflow, setTableNameOverflow] = useState(false);
+ const tableNameRef = React.useRef<HTMLInputElement>(null);
+
+ useEffect(() => {
+ const element = tableNameRef.current;
+ if (element && element.offsetWidth < element.scrollWidth) {
Review comment:
you could use optional chaining here instead of the `&&`
--
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]