Open
Description
https://codesandbox.io/p/sandbox/codesandboxer-example-forked-4z9lkz?file=%2Fexample.tsx%3A16%2C1
For very long options (or very small select boxes), the option background color does not extend into the right in the case where a horizontal scroll is needed. The selected and focused options' background is only as wide as the select box is, before scrolling.
Try the sandbox above or recreate it:
- Create a simple select box that has a very long option label
import React from "react";
import Select from "react-select";
export default () => (
<Select
options={[
{
label:
"longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong",
value: "verylong",
},
]}
/>
);
- Run it and open the dropdown by clicking the select box.
- Scroll to the right to see the rest of the label.
- See the white background
The expected behaviour is that the background color extends all the way to the right, to encompass the whole label.