Skip to content

Commit

Permalink
Merge pull request #42 from danieldunderfelt/master
Browse files Browse the repository at this point in the history
Call onload if passed as prop
  • Loading branch information
originerd authored Nov 28, 2016
2 parents 047c431 + eafe405 commit 5833e8a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/FitImage.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ class FitImage extends Image {

onLoad() {
this.setState({ isLoading: false });

if(typeof this.props.onLoad === 'function') {
this.props.onLoad();
}
}

onLoadStart() {
Expand Down

0 comments on commit 5833e8a

Please sign in to comment.