Comments (6)
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:
-
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.
-
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.
Any updates or solutions about how to resolve this issue?
from react-native-drax.
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.
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.
@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.
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)
- Drag starts on press instead of long press HOT 7
- RTL support? HOT 2
- Clipping leads to wrong sizes HOT 4
- SVG code HOT 2
- Conditional rendering of dragged item hover view when over specific receiver? (was: remove box logic) HOT 3
- Drag smooth on emulator but laggy on physical apk HOT 4
- Support for sorting horizontal wrapped lists?
- animate drop end similarly to snapback HOT 5
- Cannot drag out in web for expo sdk 49 HOT 5
- [iOS | Android] DragView does not return to the initial position after React Native 0.72.4 update HOT 2
- Expo Snack iOS Broken HOT 2
- Need Horizontal FlatList to hold items and still scroll for DraxViews/Recievers HOT 3
- Major improvements HOT 8
- react-native-drax doesnt work in react-native Modal component( HOT 1
- How to remove dragged view HOT 4
- DraxView all rendering issues HOT 2
- Ignoring gesture because view data was not found HOT 4
- Dragging Fails After Fabric Is Enabled HOT 1
- Repositioning with an Offset? HOT 1
- Is there a way to make it so when you click on a draggable object it also changes the objects style? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-drax.