Skip to content

Add an optional offset for onMenuScrollToBottom - #3757

Closed
jackspiva wants to merge 10 commits into
JedWatson:masterfrom
jackspiva:master
Closed

jackspiva wants to merge 10 commits into
JedWatson:masterfrom
jackspiva:master

Conversation

@jackspiva

@jackspiva jackspiva commented Sep 12, 2019 •

Copy link
Copy Markdown

Adds an optional onMenuScrollToBottomOffset prop that will cause onMenuScrollToBottom to fire a certain amount of pixels before the user scrolls to the bottom fo the menu.

I think this makes the onMenuScrollToBottomProp way more useful. I am currently using this change in a fork of react-select in a work project.

My use case is that I am using onMenuScrollToBottom to load more options for the select menu. Without an offset, the user has to hit the bottom of the menu and then wait for more options to load. However, with an offset, the options can be loaded before they reach the bottom, which is a lot smoother.

Addresses #1530.

@bladey bladey added pr/needs-review PRs that need to be reviewed to determine outcome pr/priority PRs that should be addressed sooner rather than later and removed ready-for-review labels May 26, 2020
@bladey bladey added pr/enhancement PRs that are specifically enhancing the project and removed category/enhancement labels Jun 24, 2020
@bladey bladey linked an issue Jul 7, 2020 that may be closed by this pull request
@ebonow ebonow added the menu-bug Addresses menu positioning, scrolling, or general interactions label Jan 16, 2021
@anushaNemilidinne

anushaNemilidinne commented Aug 21, 2021 •

Copy link
Copy Markdown

@jackspiva I am using a similar approach where if the user scrolls to the bottom of the drop down, it fetches more data from the server. But the problem is the scroll bar goes to top instead staying at the bottom. I know it's because the react component re renders on state change. But is there a way to achieve this functionality. I tried lot of different ways but no luck. Any help will be greatly appreciated! Thanks in advance!

@jackspiva jackspiva closed this Aug 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

menu-bug Addresses menu positioning, scrolling, or general interactions pr/enhancement PRs that are specifically enhancing the project pr/needs-review PRs that need to be reviewed to determine outcome pr/priority PRs that should be addressed sooner rather than later

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Request: Add an offset to logic of onMenuScrollToBottom

5 participants