hzdg / react-imageloader

A React component for wrangling image loading

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Preload w/ Failed Message Display together on Fail

gwing33 opened this issue · comments

Right now if the Image fails to load, the preloader stays and shows the Error Message.

Adding a simple check that it's loaded and not failed would do the trick...

if (this.props.preloader && this.state.status !== Status.LOADED && this.state.status !== Status.FAILED) {
      wrapperArgs.push(this.props.preloader());
}

Not sure on the desired functionality.

Awesome, thanks!