swap scroll right in react native
scrollListToStart(contentWidth, contentHeight) {
if (I18nManager.isRTL) {
this.scrollView.scrollTo({x: contentWidth});
}
}
render() {
let containerStyle = I18nManager.isRTL ? styles.RTLContainer : styles.LTRContainer;
return (
<ScrollView
ref={ref => this.scrollView = ref}
onContentSizeChange={this.scrollListToStart.bind(this)}
horizontal={true}
style={[styles.buttonsContainer, containerStyle]}>
{this.renderButtons()}
</ScrollView>
)
}
const styles = StyleSheet.create({
RTLContainer: {
flexDirection: 'row-reverse'
},
LTRContainer: {
flexDirection: 'row'
}
})
Also in JavaScript:
- moment duratuion from hours
- discord.js find word inside comment
- routes in node js
- js set iframe src
- javascript set input field value
- smtpjs attachment
- Error: It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function.
- inverser l'ordre des item d'un array js
- json stringify pretty
- Merging Or Copying Arrays Using Spread Operator
- generate random number javascript
- variables in js
- javaascript all
- créer composant react
- js maths
- includes()
- find length of longest string in array javascript
- js throttle function
- expressjs swagger yaml
- Material-ui snowflake icon
- switch javascript
- python json.dumps pretty print
- nativescript vue get native from ref
- jquery bind function to multiple events