twobin/react-lazyload

Placeholder is not working.

AxeemHaider opened this issue · 1 comments

If I set any placeholder it will not work.

Here is an example.

<LazyLoad
        placeholder={<ReactLoading/>}
        height={180}
      >
        <img
          src={tile.src}
          alt={tile.title}
          onClick={() => props.onClick(imageIndex, tile.id)}
        />
      </LazyLoad>

RectLoading returns <Skeleton variant="rect" width={210} height={118} /> from material-ui

I also try to add some text but nothing to show.

<LazyLoad
        placeholder={<Typography variant="h1">Placeholder</Typography>}
        height={180}

     .... other code

can you please look at this issue

`
<LazyLoad
placeholder={
div
Placeholder
/div}
height={180}

How about modifying the code in this way?

`

It's in the placeholder

Placeholder Try wrapping it in div before the code starts.