Closed multiwebinc closed 1 year ago
You can silence the error with https://github.com/radix-ui/primitives/issues/2059#issuecomment-1492071891
@joaom00 Thanks. I didn't find that other bug. I'll close this one since it's a duplicate.
Hey @multiwebinc did you get it? Im trying to use the same Select with the same ScrollArea but the scrollbar never shows up. Even when i set:
<ScrollArea.Viewport
style={{ overflowY: undefined }}
>
...
</ScrollArea.Viewport>
The scrollbar itself is not showing.
Detail: I just change your code to show the data im trying in my code. Basically is the same except useEffect
.
Here: https://codesandbox.io/s/twilight-night-lmxjl1?file=/src/App.tsx
Edit: I've set the Select.Viewport maxHeight to make scrollY works
@danilo-vieira Remember that Radix primitives are completely unstyled. You need to style how you want the scrollbar to look or else you won't be able to see it.
Something like this: https://codesandbox.io/s/laughing-wozniak-gggdp4?file=/src/App.js
(I tried to get Tailwind working but I was unable to, so I added inline styles for everything)
Bug report
I am trying to follow the instructions at https://www.radix-ui.com/docs/primitives/components/select#with-custom-scrollbar to get a custom scrollbar and the instructions are unclear (since
<StyledItem>
is undefined), and when I use<Select.Item>
instead of<StyledItem>
, the following works, but it logs errors to the console:Current Behavior
Expected behavior
Bugs should not occur
Reproducible example
CodeSandbox
Suggested solution
Additional context
Your environment
"@radix-ui/colors": "^0.1.8", "@radix-ui/react-accordion": "^1.1.1", "@radix-ui/react-alert-dialog": "^1.0.3", "@radix-ui/react-aspect-ratio": "^1.0.2", "@radix-ui/react-avatar": "^1.0.2", "@radix-ui/react-checkbox": "^1.0.3", "@radix-ui/react-collapsible": "^1.0.2", "@radix-ui/react-context-menu": "^2.1.3", "@radix-ui/react-dialog": "^1.0.3", "@radix-ui/react-dropdown-menu": "^2.0.4", "@radix-ui/react-hover-card": "^1.0.5", "@radix-ui/react-label": "^2.0.1", "@radix-ui/react-menubar": "^1.0.2", "@radix-ui/react-navigation-menu": "^1.1.2", "@radix-ui/react-popover": "^1.0.5", "@radix-ui/react-progress": "^1.0.2", "@radix-ui/react-radio-group": "^1.1.2", "@radix-ui/react-scroll-area": "^1.0.3", "@radix-ui/react-select": "^1.2.1", "@radix-ui/react-separator": "^1.0.2", "@radix-ui/react-slider": "^1.1.1", "@radix-ui/react-switch": "^1.0.2", "@radix-ui/react-tabs": "^1.0.3", "@radix-ui/react-toast": "^1.1.3", "@radix-ui/react-toggle": "^1.0.2", "@radix-ui/react-tooltip": "^1.0.5"