JedWatson / JedWatson/react-select

onMenuScrollToBottom and onMenuScrollToTop does not works in mobile view for Select in React

Open
#5,892 2 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

issue/bug-unconfirmed
Dominant language
TypeScript
Stars
28k
Forks
4.1k
PR merge metrics
No merged PRs in 30d

Description

i have a list of items which are X in number, I have to show all the items in the dropdown, but at once only 25.
Once the scroll shows the first 25, or you can saymenu scrolls to bottom, the next 25 should come.

I am achieving this functionality by onMenuScrollToBottom event, it is working smoothly in desktop but when it comes to mobile view only first 25 are visible, rest are not being shown.
I checked the event onMenuScrollToBottom event does not gets triggered in mobile view, howoever it gets triggered in desktop view.

Kindly provide suggestions, similar case is happening for onMenuScrollToTop
I am attaching small snippet for the same
`
<Select
options={OPTIONS_DATA}
onMenuScrollBottom={loadNextPage}

/>
`

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the attached Select snippet with 25 visible options in mobile and desktop views, then trace the Select component's menu scroll handling and compare when the bottom and top callbacks fire. Done means onMenuScrollToBottom and onMenuScrollToTop behave consistently in mobile view as they do on desktop, with the reported pagination scenario working.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.