Skip to content

Commit

Permalink
add box-sizing to border-box for RequiredInput
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
WebFreak001 authored Mar 18, 2024
1 parent 06e3488 commit 7e3b9ca
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/react-select/src/internal/RequiredInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ const RequiredInput: FunctionComponent<{
left: 0,
right: 0,
width: '100%',
boxSizing: 'border-box',
}}
// Prevent `Switching from uncontrolled to controlled` error
value=""
Expand Down

0 comments on commit 7e3b9ca

Please sign in to comment.