Skip to content

Commit e89331f

Browse files
WebFreak001lukebennett88
authored andcommitted
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.
1 parent 28251dc commit e89331f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

packages/react-select/src/internal/RequiredInput.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ const RequiredInput: FunctionComponent<{
2121
left: 0,
2222
right: 0,
2323
width: '100%',
24+
boxSizing: 'border-box',
2425
}}
2526
// Prevent `Switching from uncontrolled to controlled` error
2627
value=""

0 commit comments

Comments
 (0)