Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

147
Views
How to identify the bottom when scroller reaches to end of div in Reactjs

Below Is the div in its has a scroller with overflow. But what I want when I reach to the bottom of that div using a scroller. I want to load more items. I will append in resultList but don't know how to identify the bottom of div.

const ListItemScroll = (props) => {
        let { resultList, indexChange, radioValue, radioHandleChange } = props

        return (
            <div style={{ overflow: "auto", overflowX: "hidden", height: "90%" }}>

                <FormControl component="fieldset" variant="standard">
                    {

                        resultList[indexChange].dataList.map((list) => {
                            return (
                                <RadioGroup aria-label="gender"
                                    name="controlled-radio-buttons-group"
                                    value={radioValue[indexChange].value}
                                    onChange={(e) => radioHandleChange(e, list)}>
                                    <FormControlLabel size="small" value={list.name} control={<Radio size='small' />} label={list.name} />
                                </RadioGroup>

                            )
                        })
                    }
                </FormControl>

            </div>
        )
    }
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You need to implement Intersection Observer to identify if the div is in viewport or not. Insert an empty div before </FormControl> and use Intersection Observer on that div.

See here: https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!