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

138
Views
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
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!