-
Notifications
You must be signed in to change notification settings - Fork 431
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
Support Drag & Drop Reordering? #146
Comments
Yes, if you look at the |
Amazing @naqvitalha thanks for the explanation! |
Hi @naqvitalha, thanks for all the work on the project. We're already using recyclerlistview for our app (react-native) and I'm now working to implement dragging. I'm having a hard time seeing how ViewRenderer can accept a prop to manipulate the position (on master). Has this changed since you initially posted this? Thank you! |
@bradbumbalough You will have to accept ViewRenderer's internal cell externally as a prop. Basically RLV will get one more method called |
I'm also currently searching for drag and drop support. It looks like Edit: Looks like stableIds is part of a beta release. Still digging in 😇 |
In the travelMate sample app, I added stableIds on v1.4.0-beta.2 and tried to insert an item. RE your comment @naqvitalha |
@dkpalmer Yeah and to just try out set shouldAnimateOnce to false inside code and try inserting items. |
@naqvitalha Do you have any references/examples for using an ItemAnimator? |
@dkpalmer were you able to find anything on constructor(props) {
super(props);
// Item Animator
const itemAnimator = new DefaultNativeItemAnimator();
itemAnimator.shouldAnimateOnce = false;
this.itemAnimator = itemAnimator;
...
} |
@bradbumbalough I was not able to find anything. I was getting ready to start exploring PanResponder as well. Do you have a gist/project you can share? I tried the same thing for ItemAnimator. When you say "it's updating positions", is it just abruptly updating (no nice animation)? That's the behavior I see when I add items to the list or try swapping row data, but per your point I guess that could be the default "animation". |
@dkpalmer here's a gist for a component I made called Draggable. I'm wrapping the list item I want to drag with it. https://gist.github.com/bradbumbalough/70a79dddc922215044071dc1ff7775e7. It passes an onLongPress to its child and then is called with a TouchableHighlight. The main issue with this is that when the dataset updates the order the RLV also updates the position, and since I'm using a transform and not say I'm ok with the animations not being 👌 while getting the basic reordering to work as intended. |
|
@dkpalmer have you started anything by means of a fork? I'm going to be picking back on this now. |
@bradbumbalough I have not. We switched to an interim solution for re-ordering to be able to ship. I'll switch back to drag and drop soon, though. |
@naqvitalha I've been unable to get drag and drop working as of yet... is there plans in the future for this to be supported as a first class citizen with RLV? Thanks again for the work on this! |
@naqvitalha do you have any feedback on an updated approach on how to handle drag and drop based on the latest version? Thank you! |
Would love to see drag and drop support for this component. |
Ran across https://github.com/shufflingB/rn_draggable_swipeable_list_example for anyone looking. However, it seems to have a few issues:
|
Hello, any possibility for this component to support a draggable feature? |
This project looks awesome! I was wondering if it can do drag & drop reordering?
I'm been searching around and wasn't able to find a good solution to it. Do you think this is possible with this project?
The text was updated successfully, but these errors were encountered: