Skip to content

Commit e798e4c

Browse files
author
Hector Arce De Las Heras
committed
Improve animation styles for PillSelector
1 parent e06ee92 commit e798e4c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/pillSelector/pillSelectorControlled.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const PillSelectorControlledComponent = React.forwardRef(
3434

3535
thumb.style.width = `${selectedPill?.clientWidth}px`;
3636
thumb.style.height = `${selectedPill?.getBoundingClientRect().height}px`;
37-
thumb.style.left = `calc(${selectedPill?.getBoundingClientRect().left}px - ${window?.getComputedStyle(selectedPill)?.paddingLeft})`;
37+
thumb.style.left = `${selectedPill.offsetLeft}px`;
3838
}
3939
};
4040

0 commit comments

Comments
 (0)