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

140
Vistas
Component inside Scroll component not showing data

I build an react app, using Scroll component outside CardList component.I used style overflow inside div element in Scroll.js file. When I don't use style overflow then CardList(childern component) shows the content but with style it doesn't. I don't know what mistake I did.

App.js file

render() {
        const filteredRobots = this.state.robots.filter( robot =>{
            return robot.name.toLowerCase().includes(this.state.searchfield.toLowerCase());
        })

        if(this.state.robots.length === 0){
            return <h1>Loading</h1>
        } else {
        return (
            <div className='tc'>
            <h1 className='f1'>RoboFriends</h1>
            <Searchbox searchChange={this.onSearchChange} />
            <Scroll>
            <CardList robots={filteredRobots} />
            </Scroll>
            </div>
    );
        }
}

Scroll.js file

import React from 'react';

const Scroll = (props) => {
    return ( <div style={{overflowY: 'scroll',border:'1px solid red',height:'600px'}}>
    {props.childern}
    </div>
    );
    }

export default Scroll;

Complete Files : https://drive.google.com/drive/folders/1mCWnQhOyf0TuzUJhzwxGa3bnAt3bULmb?usp=sharing

about 4 years ago · Juan Pablo Isaza
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