JedWatson / react-select

The Select Component for React.js
https://react-select.com/
MIT License
27.42k stars 4.1k forks source link

add box-sizing to border-box for RequiredInput #5880

Open WebFreak001 opened 3 months ago

WebFreak001 commented 3 months ago

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.

The RequiredInput is added if the select is required and empty, to make the native browser validation messages show at a valid location. If it was completely hidden/removed using display: none it wouldn't show any validation errors anymore (at least in chromium based browsers)

changeset-bot[bot] commented 3 months ago

⚠️ No Changeset found

Latest commit: 7e3b9caa89877047adde1a38656f527b93875d50

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

codesandbox-ci[bot] commented 3 months ago

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.