Skip to content

Instantly share code, notes, and snippets.

@VesperDev
Created September 11, 2018 19:58
Show Gist options
  • Save VesperDev/a962b5932cf0730d494bdf4f32981c74 to your computer and use it in GitHub Desktop.
Save VesperDev/a962b5932cf0730d494bdf4f32981c74 to your computer and use it in GitHub Desktop.
Activar TabView del plugin react-native-scrollable-tab-view
measureTab(page, event) {
const { x, width, height, } = event.nativeEvent.layout;
this._tabsMeasurements[page] = {left: x, right: x + width, width, height, };
this.updateView({value: this.props.scrollValue._value, });
this.updateView({value: this.props.scrollValue.__getValue(), });
},
render() {
@@ -207,12 +207,12 @@ const ScrollableTabBar = createReactClass({
width = WINDOW_WIDTH;
}
this.setState({ _containerWidth: width, });
this.updateView({value: this.props.scrollValue._value, });
this.updateView({value: this.props.scrollValue.__getValue(), });
},
onContainerLayout(e) {
this._containerMeasurements = e.nativeEvent.layout;
this.updateView({value: this.props.scrollValue._value, });
this.updateView({value: this.props.scrollValue.__getValue(), });
},
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment