Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

149
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda