Skip to content

Commit

Permalink
Merge branch 'release/0.8.7'
Browse files Browse the repository at this point in the history
  • Loading branch information
Vladimir Adamic committed Sep 29, 2016
2 parents f76df86 + cb05a82 commit 54c9abe
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
12 changes: 12 additions & 0 deletions connectAnimation.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ export function connectAnimation(WrappedComponent, animations = {}) {
super(props, context);
this.onLayout = this.onLayout.bind(this);
this.resolveStyle = this.resolveStyle.bind(this);
this.setWrappedInstance = this.setWrappedInstance.bind(this);
this.state = {
layout: {
height: 0,
Expand Down Expand Up @@ -174,6 +175,16 @@ export function connectAnimation(WrappedComponent, animations = {}) {
});
}

setNativeProps(nativeProps) {
if (this.wrappedInstance.setNativeProps) {
this.wrappedInstance.setNativeProps(nativeProps);
}
}

setWrappedInstance(component) {
this.wrappedInstance = component;
}

render() {
const { resolvedStyle } = this.state;
const ConnectedComponent = isComponentAnimated(this.props) ?
Expand All @@ -185,6 +196,7 @@ export function connectAnimation(WrappedComponent, animations = {}) {
onLayout={this.onLayout}
{...this.props}
style={resolvedStyle}
ref={this.setWrappedInstance}
/>
);
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@shoutem/animation",
"version": "0.8.6",
"version": "0.8.7",
"description": "Shoutem Animation Library",
"main": "index.js",
"repository": {
Expand Down

0 comments on commit 54c9abe

Please sign in to comment.