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.

Placeholder component still visible

See original GitHub issue

Hi,

I am using the lazy load component and I have a problem on mobile where after scrolling the placeholders are not updated.

I have the below overflows set in some of the top parents.

overflow-x:hidden; overflow-y: auto;

If I tap on the placeholder it updates and shows the element correctly.

The LazyLoad component is as follows:

<LazyLoad key={index} height={156} offset={156 * 3} placeholder={<ListItemPlaceholder/>} debounce={false} throttle={false} unmountIfInvisible={true} overflow={true} >

Any advice?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:19

github_iconTop GitHub Comments

6reactions
mqliutiecommented, Apr 1, 2017

unmountIfInvisible 在某元素不可见的时候没有 unmount

我的理解是如果这个元素不在视野之内,那么它应该会被替换成 PlaceHolder 的内容吧

但是我将 unmountIfInvisible 设置成 true 的时候,那个元素不在可视区域内并没有替换成 PlaceHolder 内容

3reactions
jasonslyviacommented, Apr 14, 2017

@mqliutie once 意思就是一旦被懒加载的元素进入视口被渲染后,LazyLoad 就不再接管后续的事宜了,这里可能在文档中注明一下会更好。

Read more comments on GitHub >

github_iconTop Results From Across the Web

reactjs - How to make placeholder still visible? - Stack Overflow
First of all I'm killing the placeholder and replace it by a div inside ValueContainer custom component. From there I can style my...
Read more >
Placeholder component still visible · Issue #74 - GitHub
Hi, I am using the lazy load component and I have a problem on mobile where after scrolling the placeholders are not updated....
Read more >
:placeholder-shown - CSS: Cascading Style Sheets | MDN
The :placeholder-shown CSS pseudo-class represents any or element that is currently displaying placeholder text.
Read more >
Add Here not Visible in Placeholder in Experience Editor
I have a scenario where the Add Here button is not visible for the placeholder I want to add a component to. I...
Read more >
placeholder-shown - CSS-Tricks
The :placeholder-shown pseudo-class selects the input element itself when placeholder text exists in a form input. Think of it as a nice.
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