airbnb/caravel

View on GitHub
superset-frontend/packages/superset-ui-core/src/hooks/useTruncation/useChildElementTruncation.ts

Summary

Maintainability
A
3 hrs
Test Coverage

Function useChildElementTruncation has 50 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const useChildElementTruncation = () => {
  const [elementsTruncated, setElementsTruncated] = useState(0);
  const [hasHiddenElements, setHasHiddenElements] = useState(false);
  const elementRef = useRef<HTMLDivElement>(null);
  const plusRef = useRef<HTMLDivElement>(null);

    Function onResize has 32 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        const onResize = () => {
          const currentElement = elementRef.current;
          if (!currentElement) {
            return;
          }

      There are no issues that match your filters.

      Category
      Status