question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

overflow={true} still can`t be shown

See original GitHub issue

lazy loading components inside a overflow container, set this to true.

 <LazyLoad height={50} offset={100} overflow once>
       <img src={item.headImg} alt="" className={style.avatar} />
 </LazyLoad>

but, not render

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:7
  • Comments:14

github_iconTop GitHub Comments

14reactions
naoyeyecommented, Jul 24, 2018

maybe not universal, in my case, I replaced overflow-y: scroll; with overflow: auto;, then solved.

<div className="scroll-area">
  content.map((item, index) => {
    return (
      <LazyLoad key={`_container_img_${index}`}
        height={ 230 }
        placeholder={ placeholder }
        debounce={ -40 }
        overflow
        once>
        <div className={ style.imgwrap }>
          <img src={ item.url } />
        </div>
      </LazyLoad>
    )
  })
</div>
.scroll-area {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  text-align: center;
  overflow-y: scroll; // I replaced it with `overflow: auto;`, then solved.
  -webkit-overflow-scrolling: touch;
}
2reactions
jasonslyviacommented, Mar 27, 2018

try remove offset props and see what’s happening

Read more comments on GitHub >

github_iconTop Results From Across the Web

overflow - CSS: Cascading Style Sheets - MDN Web Docs
Overflow options include clipping, showing scrollbars, or displaying the content flowing out of its container into the surrounding area.
Read more >
Overflow Scroll css is not working in the div
I need a vertical scrollbar in the wrapper div, height should be auto or 100% based on the content. The header should be...
Read more >
Overflow Issues In CSS - Smashing Magazine
One of the most common causes of overflow is fixed-width elements. Generally speaking, don't fix the width of any element that should work...
Read more >
overflow - CSS-Tricks
The overflow property controls what happens to content that breaks outside of its bounds: imagine a div in which you've explicitly set to...
Read more >
CSS Overflow – Visible, Scroll, Auto, or Hidden? The Overflow ...
Now the scrollbar only appears vertically. The auto value detects where the overflow happens and adds a scrollbar in that direction. No ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found