Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flatlist nesting is not working properly Scroll #26025

Closed
wangfpp opened this issue Aug 12, 2019 · 3 comments
Closed

Flatlist nesting is not working properly Scroll #26025

wangfpp opened this issue Aug 12, 2019 · 3 comments
Labels
Bug Component: FlatList Platform: Linux Building on Linux. Stale There has been a lack of activity on this issue and it may be closed soon.

Comments

@wangfpp
Copy link

wangfpp commented Aug 12, 2019

Info

React Native Environment Info:
System:
OS: Linux 4.15 Ubuntu 18.04.3 LTS (Bionic Beaver)
CPU: (8) x64 Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz
Memory: 474.79 MB / 15.55 GB
Shell: 4.4.20 - /bin/bash
Binaries:
Node: 8.10.0 - /usr/bin/node
Yarn: 1.16.0 - /usr/local/bin/yarn
npm: 3.5.2 - /usr/bin/npm
npmPackages:
react: 16.8.3 => 16.8.3
react-native: 0.59.9 => 0.59.9
npmGlobalPackages:
react-native-cli: 2.0.1

Example Code

              <FlatList
                        data={this.state.grouplist}
                        style={styles.leftflatlist}
                        // contentContainerStyle={{height: 200}}
                            numColumns={4}
                            extraData={this.state}
                            horizontal={false}
                            renderItem={({item, index}) => {
                                let list = item;
                                let _index = index;
                                return (
                                        <FlatList 
                                             listKey={_index}
                                            data={list}
                                            extraData={this.state}
					   horizontal={false}
					style={styles.scroll}
					numColumns={4}
					renderItem={({item, index}) => {
					return (
                                                    <TouchableHighlight 
                                                    underlayColor="rgba(0,0,0,0)"
                                                    key={item.index} 
                                                    onPress={this.editorGroup.bind(this, _index, index, item)}>
                                                        <Avatar 
                                                        shake={this.state.rotateList[_index]}
                                                        icon={{uri: item.face_image}}
                                                        name={item.name}>
                                                    </Avatar> 
                                                    </TouchableHighlight>
												)
	                      </FlatList>
            </FaltList>

Inner layer cannot be scrolled

@wangfpp wangfpp added the Bug label Aug 12, 2019
@react-native-bot react-native-bot added the Platform: Linux Building on Linux. label Aug 12, 2019
@radko93 radko93 changed the title FaltList nesting is not working properly Scroll Flatlist nesting is not working properly Scroll Aug 12, 2019
@vinicarra
Copy link

I might be wrong but seems you don't actually need 2 FlatLists to produce the results you're looking for. Perhaps a SectionList would better fit your needs as it can separate its content in groups while using only 1 scrollable area. Nested FlatLists will mostly likely not work as you are expecting as one might end stealing the scrollEvent from the other. A good example for nested FlatLists is when their direction diverges (e.g the main FlatList using vertical scrolling while its children using horizontal scrolling).

@stale
Copy link

stale bot commented Nov 10, 2019

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions.

@stale stale bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Nov 10, 2019
@stale
Copy link

stale bot commented Nov 17, 2019

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.

@stale stale bot closed this as completed Nov 17, 2019
@facebook facebook locked as resolved and limited conversation to collaborators Nov 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Component: FlatList Platform: Linux Building on Linux. Stale There has been a lack of activity on this issue and it may be closed soon.
Projects
None yet
Development

No branches or pull requests

3 participants