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 causes corruption after item is dragged #87

Open
mronline opened this issue Oct 18, 2023 · 1 comment
Open

FlatList causes corruption after item is dragged #87

mronline opened this issue Oct 18, 2023 · 1 comment

Comments

@mronline
Copy link

mronline commented Oct 18, 2023

After dragging the item, FlatList onViewableItemsChanged no longer triggers.

[email protected]
[email protected]

I noticed that when it happens like this there is this bug:

<ScrollView scrollEnabled={this.state.scrollEnabled}>
    <DraggableGrid
        numColumns={3}
        renderItem={this.render_item}
        data={this.state.data}
        onDragStart={() => {
            this.setState({scrollEnabled: false})
        }}
        onDragRelease={(data) => {
            this.setState({data, scrollEnabled: true});
        }}
    />
</ScrollView>
@mronline
Copy link
Author

When I did it as mentioned here #84 (comment) the problem was solved. I think updating it as state causes such a problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant