Skip to content

Commit

Permalink
removed resize and timer because we do not change tag size based off …
Browse files Browse the repository at this point in the history
…of window size
  • Loading branch information
ArtsiomWB committed Dec 25, 2024
1 parent 42c1863 commit 3264abf
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 10 deletions.
9 changes: 0 additions & 9 deletions weave-js/src/components/Tag/Tag.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,16 +111,7 @@ export const RemovableTag: FC<RemovableTagProps> = ({
setIsTruncated(isTagLabelTruncated(labelRef));
}
};

checkTruncation();
window.addEventListener('resize', checkTruncation);

const timer = setTimeout(checkTruncation, 100);

return () => {
window.removeEventListener('resize', checkTruncation);
clearTimeout(timer);
};
}, [label]);

const classes = useTagClasses({color, isInteractive: true, label});
Expand Down
1 change: 0 additions & 1 deletion weave-js/src/components/Tag/TagTooltip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ export const TagTooltip = React.forwardRef<HTMLElement, TagTooltipProps>(
<Tooltip
ref={ref}
position="top center"
open={passThroughProps.disabled ? false : undefined}
content={
<span
style={{
Expand Down

0 comments on commit 3264abf

Please sign in to comment.