Merge pull request #18274 from paranoidjk/master

fix(ReactNative): ScrollView.props.style definition error
This commit is contained in:
Eloy Durán
2017-07-24 13:25:20 +02:00
committed by GitHub
2 changed files with 10 additions and 2 deletions
+1 -1
View File
@@ -6065,7 +6065,7 @@ export interface ScrollViewProperties extends ViewProperties, ScrollViewProperti
/**
* Style
*/
style?: ScrollViewStyle | Array<ScrollViewStyle | undefined>
style?: StyleProp<ScrollViewStyle>
/**
* A RefreshControl component, used to provide pull-to-refresh
+9 -1
View File
@@ -244,6 +244,14 @@ export class CapsLockComponent extends React.Component<TextProperties> {
class ScrollerListComponentTest extends React.Component<{}, { dataSource: ListViewDataSource}> {
render() {
const scrollViewStyle1 = StyleSheet.create({
scrollView: {
backgroundColor: 'red',
},
});
const scrollViewStyle2 = {
flex: 1
};
return (
<ListView dataSource={this.state.dataSource}
renderScrollComponent={(props) => {
@@ -251,7 +259,7 @@ class ScrollerListComponentTest extends React.Component<{}, { dataSource: ListVi
throw new Error("Expected scroll to be enabled.")
}
return <ScrollView {...props} />
return <ScrollView {...props} style={[scrollViewStyle1.scrollView, scrollViewStyle2]}/>
}}
renderRow={({ type, data }, _, row: number) => {
return <Text>Filler</Text>