-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
[v2] onMenuScrollToBottom does not fire if dropdown is not scrollable on mount #2862
Comments
What about add prop for allow listen scrolls always? |
Hi, is @pyreta 's change going to be merged anytime soon? I'm having the same issues. |
@JedWatson What's the next step to resolve this bug? There's two existing PRs addressing this usecase, neither with clear feedback on what needs to be done differently to accept the PRs: |
Any update on this issue? To me this fix seems ok: #3219 We have this issue with paginated select component. If the select is opened before the first page is loaded the pagination is broken. The fix I've used it is kinda hacky and I would like to get rid of it. I change the key on select-menu when first page is loaded. This makes the menu remount, menu as scroll and it listens to scroll events. I am open to contribute to fix this issue. Thank you! |
Greetings, everyone and apologies for the extremely late reply. I recall looking at this earlier without being able to replicate the example so I decided to put a little more time and better understand the use-case. Since the root case is the options being loaded when the menu is already open, I modified the example above to load the options on setTimeout. https://codesandbox.io/s/strange-goodall-nncgb?file=/src/index.js
Perhaps this better encapsulates the root cause as pointed out by @vtaits . The crux of all of this is that all of these events are applied to a ref to which should be just So 3 possible solutions for this are:
My preference would like be the third option as it likely overcomes all of the challenges of listening to touch scrolling events. |
I updated |
@JedWatson I wasn't sure how to test but you can see a codesandbox example here where opening the dropdown with options already loaded allows for the
onMenuScrollToBottom
callback to log "bottom" in the console. However if you clear the options before opening the dropdown, the callback will not fire after options have loaded.I've submitted this PR as a fix.
Thanks!
The text was updated successfully, but these errors were encountered: