mirror of
https://github.com/zhigang1992/react-native-web.git
synced 2026-01-12 22:51:09 +08:00
[fix] ScrollView style issues
* Fix contentContainer not expanding to contain all child elements * Add momentum scrolling on iOS Fix #197
This commit is contained in:
@@ -52,6 +52,7 @@ const styles = StyleSheet.create({
|
||||
borderWidth: '1px'
|
||||
},
|
||||
scrollViewContentContainerStyle: {
|
||||
backgroundColor: '#eee',
|
||||
padding: '10px'
|
||||
}
|
||||
})
|
||||
|
||||
@@ -74,7 +74,8 @@ StyleSheetValidation.addValidStylePropTypes({
|
||||
display: PropTypes.string,
|
||||
float: PropTypes.oneOf([ 'left', 'none', 'right' ]),
|
||||
font: PropTypes.string, /* @private */
|
||||
listStyle: PropTypes.string
|
||||
listStyle: PropTypes.string,
|
||||
WebkitOverflowScrolling: PropTypes.string /* @private */
|
||||
})
|
||||
|
||||
module.exports = StyleSheetValidation
|
||||
|
||||
@@ -222,14 +222,16 @@ const styles = StyleSheet.create({
|
||||
base: {
|
||||
flex: 1,
|
||||
overflowX: 'hidden',
|
||||
overflowY: 'auto'
|
||||
overflowY: 'auto',
|
||||
WebkitOverflowScrolling: 'touch'
|
||||
},
|
||||
baseHorizontal: {
|
||||
flexDirection: 'row',
|
||||
overflowX: 'auto',
|
||||
overflowY: 'hidden'
|
||||
},
|
||||
contentContainer: {
|
||||
flex: 1
|
||||
flexGrow: 1
|
||||
},
|
||||
contentContainerHorizontal: {
|
||||
flexDirection: 'row'
|
||||
|
||||
@@ -16,6 +16,7 @@ module.exports = {
|
||||
backgroundColor: ColorPropType,
|
||||
opacity: number,
|
||||
overflow: autoOrHiddenOrVisible,
|
||||
zIndex: number,
|
||||
/*
|
||||
* @platform web
|
||||
*/
|
||||
@@ -34,5 +35,5 @@ module.exports = {
|
||||
transition: string,
|
||||
userSelect: string,
|
||||
visibility: hiddenOrVisible,
|
||||
zIndex: number
|
||||
WebkitOverflowScrolling: oneOf([ 'auto', 'touch' ])
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user