react-native-draggable-flatlist
react-native-draggable-flatlist copied to clipboard
Static/Non Interactive elements in list
Is your feature request related to a problem? Please describe.
The implementation I am working on is a scrollable list where one can drag and drop cards between "sections", let's call them Morning, Afternoon, Evening.
I can set Morning, Afternoon and Evening to have drag and drop disabled, because I do not want the user to be able to drag and drop them, however, the problem now is that a user would be able to drag a card ABOVE Morning, which is unwanted behaviour.
The user should be able to drag and drop cards between the "sections", above Afternoon or Evening, but NOT above Morning.
Describe the solution you'd like
I would like a way to set an element in the list as static (i.e. does not interact with the rest) so that it doesn't move away when a user tries to drag a card above it.
Describe alternatives you've considered
I have tried taking the Morning section header completely out of the list, however, this introduces the problem that now that section is always visible at the top during autoscroll.
We have same requirement in our project. We have 3 sections and user should be able to drag items between them, since there is no draggable-section-list I've tried doing this with a DraggableFlatList and rendering different views for items, section headers, section footers etc, it displays correctly but when user drags, they can drag above section header or below section footer which is not desirable. I think adding the ability to make some items "fixed" would be very useful for many.
Agree, would find this to be helpful. Right now as a workaround I am having to put static items in the header or footer.
Agree, would find this to be helpful. Right now as a workaround I am having to put static items in the header or footer.
How do you make them static? Are those elements outside of the Draglist?
How do you make them static? Are those elements outside of the Draglist?
Yes. Pretty much have to pluck items I don't want to be moved out of the list and stick them in the header.
How do you make them static? Are those elements outside of the Draglist?
Yes. Pretty much have to pluck items I don't want to be moved out of the list and stick them in the header.
Ah yea, I've been doing pretty much the same thing.