fix: improve type annotation for barRef in GanttChartBar component

This commit is contained in:
Nawaz Dhandala
2026-03-24 16:45:32 +00:00
parent 3a65405401
commit 24db673926

View File

@@ -35,8 +35,9 @@ const Bar: FunctionComponent<ComponentProps> = (
props: ComponentProps,
): ReactElement => {
const [isHovered, setIsHovered] = useState(false);
const barRef: React.RefObject<HTMLDivElement | null> =
useRef<HTMLDivElement>(null);
const barRef: React.RefObject<HTMLDivElement> = useRef<HTMLDivElement>(
null,
) as React.RefObject<HTMLDivElement>;
// calculate bar width.
let barWidth: number =