Created
September 11, 2018 19:58
-
-
Save VesperDev/a962b5932cf0730d494bdf4f32981c74 to your computer and use it in GitHub Desktop.
Activar TabView del plugin react-native-scrollable-tab-view
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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