From e89331fa3ede0326f7b8b4131e9687a76ff3808c Mon Sep 17 00:00:00 2001 From: Jan Jurzitza Date: Mon, 18 Mar 2024 21:02:25 +0100 Subject: [PATCH] add box-sizing to border-box for RequiredInput adding `required` would otherwise cause an extra (unstylable) component to be added which has some implicit padding from the user agent style sheet (inputs have padding) which could cause horizontal scrolling when the whole scroll field is 100% wide. --- packages/react-select/src/internal/RequiredInput.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/react-select/src/internal/RequiredInput.tsx b/packages/react-select/src/internal/RequiredInput.tsx index 834dfca3b3..00d2c1588f 100644 --- a/packages/react-select/src/internal/RequiredInput.tsx +++ b/packages/react-select/src/internal/RequiredInput.tsx @@ -21,6 +21,7 @@ const RequiredInput: FunctionComponent<{ left: 0, right: 0, width: '100%', + boxSizing: 'border-box', }} // Prevent `Switching from uncontrolled to controlled` error value=""