New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ComboBox list items not scrolling #6241
Comments
Yah yah I've also faced this issue many times. |
@snowystinger just tested with the nightly and I still saw this issue, so seems unrelated. |
I was also looking into this issue at the moment, and realized PopoverWrapper was being rendered too many times (this can be verified with React Developer Tools). And this infinite rendering of It looks like the root cause of this chain rendering is the invocation of react-spectrum/packages/@react-aria/overlays/src/useOverlayPosition.ts Lines 195 to 204 in 72775d2
If the above Screen.Recording.2024-04-23.at.12.32.45.AM.movUpdateMight be related to #5653 (comment) in terms of the change in behavior of |
I'm experiencing the same issue. When the list is long enough and a scrollbar is rendered, the So far, I've only seen this happen when Setting a fixed max-height on This recording shows scroll state resetting: Screen.Recording.2024-04-25.at.11.18.45.movAnd this recording shows a Screen.Recording.2024-04-25.at.11.24.15.mov |
If it helps, I've noticed that rolling back one version to 3.33.1 fixes it, so it must have been introduced by a commit between that and 3.34.0. |
Another thing I noticed was it only happens if the parent doesn't contain enough space to fit the list, so for example: Works: <View height="4000px"> // height bigger than list
<ComboBox
label="test"
items={Array.from({ length: 200 }, (_, index) => ({
name: `Item ${index}`,
key: index,
}))}
>
{(item) => <Item>{item.name}</Item>}
</ComboBox>
</View> Doesn't work: <View height="1000px"> // height smaller than list
<ComboBox
label="test"
items={Array.from({ length: 200 }, (_, index) => ({
name: `Item ${index}`,
key: index,
}))}
>
{(item) => <Item>{item.name}</Item>}
</ComboBox>
</View> |
Looks like we broke this in #5808 |
Provide a general summary of the issue here
I am integrating comboBox with my React app,
React - v18
Node - v20.7.0
OS - Ubuntu 22.04.4 LTS
Peek.2024-04-20.15-07.mp4
🤔 Expected Behavior?
Should be able to scroll the items in the list box
😯 Current Behavior
Unable to scroll items in list box
💁 Possible Solution
No response
🔦 Context
No response
🖥️ Steps to Reproduce
yarn
yarn storybook
Version
3.34.1
What browsers are you seeing the problem on?
Chrome
If other, please specify.
No response
What operating system are you using?
Ubuntu
🧢 Your Company/Team
No response
🕷 Tracking Issue
No response
The text was updated successfully, but these errors were encountered: