mirror of
https://github.com/zoriya/react-native-web.git
synced 2026-05-30 09:19:21 +00: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'
|
borderWidth: '1px'
|
||||||
},
|
},
|
||||||
scrollViewContentContainerStyle: {
|
scrollViewContentContainerStyle: {
|
||||||
|
backgroundColor: '#eee',
|
||||||
padding: '10px'
|
padding: '10px'
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -74,7 +74,8 @@ StyleSheetValidation.addValidStylePropTypes({
|
|||||||
display: PropTypes.string,
|
display: PropTypes.string,
|
||||||
float: PropTypes.oneOf([ 'left', 'none', 'right' ]),
|
float: PropTypes.oneOf([ 'left', 'none', 'right' ]),
|
||||||
font: PropTypes.string, /* @private */
|
font: PropTypes.string, /* @private */
|
||||||
listStyle: PropTypes.string
|
listStyle: PropTypes.string,
|
||||||
|
WebkitOverflowScrolling: PropTypes.string /* @private */
|
||||||
})
|
})
|
||||||
|
|
||||||
module.exports = StyleSheetValidation
|
module.exports = StyleSheetValidation
|
||||||
|
|||||||
@@ -222,14 +222,16 @@ const styles = StyleSheet.create({
|
|||||||
base: {
|
base: {
|
||||||
flex: 1,
|
flex: 1,
|
||||||
overflowX: 'hidden',
|
overflowX: 'hidden',
|
||||||
overflowY: 'auto'
|
overflowY: 'auto',
|
||||||
|
WebkitOverflowScrolling: 'touch'
|
||||||
},
|
},
|
||||||
baseHorizontal: {
|
baseHorizontal: {
|
||||||
|
flexDirection: 'row',
|
||||||
overflowX: 'auto',
|
overflowX: 'auto',
|
||||||
overflowY: 'hidden'
|
overflowY: 'hidden'
|
||||||
},
|
},
|
||||||
contentContainer: {
|
contentContainer: {
|
||||||
flex: 1
|
flexGrow: 1
|
||||||
},
|
},
|
||||||
contentContainerHorizontal: {
|
contentContainerHorizontal: {
|
||||||
flexDirection: 'row'
|
flexDirection: 'row'
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ module.exports = {
|
|||||||
backgroundColor: ColorPropType,
|
backgroundColor: ColorPropType,
|
||||||
opacity: number,
|
opacity: number,
|
||||||
overflow: autoOrHiddenOrVisible,
|
overflow: autoOrHiddenOrVisible,
|
||||||
|
zIndex: number,
|
||||||
/*
|
/*
|
||||||
* @platform web
|
* @platform web
|
||||||
*/
|
*/
|
||||||
@@ -34,5 +35,5 @@ module.exports = {
|
|||||||
transition: string,
|
transition: string,
|
||||||
userSelect: string,
|
userSelect: string,
|
||||||
visibility: hiddenOrVisible,
|
visibility: hiddenOrVisible,
|
||||||
zIndex: number
|
WebkitOverflowScrolling: oneOf([ 'auto', 'touch' ])
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user