Skip to content

marginTop=percent: FlatList does not scroll #20410

Description

@doublex

Environment

 React Native Environment Info:
System:
OS: macOS High Sierra 10.13.2
CPU: x64 Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz
Memory: 1.55 GB / 16.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 8.9.2 - /usr/local/bin/node
npm: 5.8.0 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 11.2, macOS 10.13, tvOS 11.2, watchOS 4.2
Android SDK:
Build Tools: 23.0.1, 25.0.0, 25.0.1, 25.0.2, 25.0.3, 26.0.2, 26.0.3, 27.0.2, 27.0.3
API Levels: 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27
IDEs:
Android Studio: 3.1 AI-173.4819257
Xcode: 9.2/9C40b - /usr/bin/xcodebuild
npmPackages:
react: 16.4.1 => 16.4.1 react-native: 0.56.0 => 0.56.0 npmGlobalPackages:
react-native-cli: 2.0.1

Description

List with marginTop: percent-value items has:
a) wrong height
b) does not scroll

Reproducible Demo

 render() {
let items = [{key:'0'},{key:'1'},{key:'2'},{key:'3'},{key:'4'},{key:'5'},{key:'6'},{key:'7'},{key:'8'},{key:'9'}];
return (
<View style={{height:100}}>
<FlatList data={items}
renderItem={({item, index}) => (
<View style={{marginTop:'1%'}}>
<View><Text>Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua.</Text></View>
</View>
)} />
</View>
);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    StaleThere has been a lack of activity on this issue and it may be closed soon.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions