From 5498b162390ab2fe335ed2d5080767a3e7dc9a5f Mon Sep 17 00:00:00 2001 From: KalebLenfest <57231617+KalebLenfest@users.noreply.github.com> Date: Wed, 4 Sep 2024 09:26:11 -0700 Subject: [PATCH] Fixing sizing and position issues with Math.floor for dropdown When testing this library, I found that removing the Math.floor would get the correct size of the parent component, whereas with it would end up short in many cases both for width and left specifically --- src/components/Dropdown/index.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/Dropdown/index.tsx b/src/components/Dropdown/index.tsx index db976f5..fd6a4e8 100644 --- a/src/components/Dropdown/index.tsx +++ b/src/components/Dropdown/index.tsx @@ -206,11 +206,11 @@ const DropdownComponent: ( setPosition({ isFull, - width: Math.floor(width), + width: width, top: Math.floor(top + statusBarHeight), bottom: Math.floor(bottom - statusBarHeight), - left: Math.floor(left), - height: Math.floor(height), + left: left, + height: height, }); }); }