GithubHelp home page GithubHelp logo

Comments (6)

lafiosca avatar lafiosca commented on August 21, 2024

The existing shift system applies transforms to all the items in the list that need to be adjusted. Brainstorming, here are two potential alternative approaches if we can't make the existing approach work:

  1. Actually reduce the size of the shifted item in the list to 0 and insert an additional item in the list wherever the dragged item is hovering. I think this might end up looking much jerkier than the smooth animations we have now because of views being destroyed/recreated, but I'm not sure without testing.

  2. Only when on Android and in horizontal mode, render a whole bunch of additional hover copies of the views. This seems like overkill and might have an extreme performance impact, but we already know that hover views as implemented by Drax do not get clipped in this way. I do not want to have to use this approach.

from react-native-drax.

DmitriyNikolenko avatar DmitriyNikolenko commented on August 21, 2024

Any updates or solutions about how to resolve this issue?

from react-native-drax.

lafiosca avatar lafiosca commented on August 21, 2024

I apologize, @DmitriyNikolenko, but I haven't had availability to focus on fixing this use case. The speculation above is all the progress that was made. I do not know when I will be able to research it more deeply, but anyone is welcome to explore it in the meantime and share their findings.

from react-native-drax.

DmitriyNikolenko avatar DmitriyNikolenko commented on August 21, 2024

I am sure this bug appears due to using FlatList in DraxList component. If we change FlatList to ScrollView this bug will be fixed.

from react-native-drax.

lafiosca avatar lafiosca commented on August 21, 2024

@DmitriyNikolenko If we switched from FlatList to ScrollView, wouldn't we (in theory) lose the virtualized list item benefits for long lists though?

from react-native-drax.

lafiosca avatar lafiosca commented on August 21, 2024

While working on other items, I just noticed that this behavior no longer occurs with the latest versions of libraries I'm using. I am not sure when this changed. I am using react-native 0.63.3 and react-native-drax 0.7.2 and have tested on a Pixel 2 emulator running Android 8.1 as well as a physical Nokia 3.4 phone running Android 10. If anyone still runs into this issue, feel free to comment here with information about your device and versions. For now I will close the issue.

from react-native-drax.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.