omahili / react-native-reorderable-list Goto Github PK
View Code? Open in Web Editor NEWA reorderable list for React Native applications, powered by Reanimated 2 ๐
License: MIT License
A reorderable list for React Native applications, powered by Reanimated 2 ๐
License: MIT License
First thank you for your nice lib !
My problem appears when ReorderableList is nested inside a scrollview.
It works fine if the parent is not scrolled but as soon as we scroll, the drag mechanism is unusable, probably because the position of ReorderableList changed.
Do you have an idea to solve this ?
I want to know when dragging has stopped for any element.
The closest thing to this is onReorder
, but that only gets called when the position has changed.
This PR allows the component to call onReorder
to get called even if the item does not change position.
Hi,
I am using your awesome list (the smoothest out there) inside a TabBar (and also do have Statusbar + Nav header) and I've also added ListHeaderComponent
to the Flatlist.
I think your lib only works in a plain naked view without any header, bottom tabs and ListHeaderComponent.
Autoscroll is not working correctly. Everything else is working super smooth though.
Could you have a look at this? I would love to sponsor this feature if you can fix it quickly.
This is currently on iOS, I haven't tested Android yet but I will.
It would be interesting if we could put items anywhere inside of a scrollview rather than in a flatlist:
const scrollRef = useAnimatedRef()
<Animated.ScrollView ref={scrollRef}>
<Reorder scrollRef={scrollRef} items={items} onSetItems={setItems}>
{items.map(item => <Reorder.Item key={item} />)}
</Reorder>
</Animated.ScrollView>
That's some pseudo-code inspired by framer-motion
's Reorder
component. We could pass the scroll ref to the component and not have to worry about list header and footer components, which are bad for general composability.
All good if this is too challenging, figured I'd mention it in case. Feel free to close if it feels out of scope.
Hi @omahili ,
awesome library so far, thanks for making a reanimated 2 version.
It is somehow working but has some odd behaviour when you use ListHeader and ListFooter. As soon as I pick the element, it starts jumping. I made a video to make it obvious what I am actually talking about. It works okish when I pick elements from the center, but not from the top. As soon as I longpress, weird things start to happen.
Any ideas how to optimize this? Thank you very much!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.