mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-12-04 12:11:47 +00:00
Merge pull request #18274 from paranoidjk/master
fix(ReactNative): ScrollView.props.style definition error
This commit is contained in:
Vendored
+1
-1
@@ -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
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user