Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-native-drag-sort

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-drag-sort

Drag and drop sort control for react-native

  • 2.4.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.3K
decreased by-53.07%
Maintainers
1
Weekly downloads
 
Created
Source

react-native-drag-sort

Drag and drop sort control for react-native

GitHub license npm

Version Iteration

Installation

yarn add react-native-drag-sort
or
npm i react-native-drag-sort --save 

export { DragSortableView, AutoDragSortableView }

Performance(GIF)

AutomaticSlidingOnePageAutomaticSlidingThreePage
ScrollFixedAddPageDragDeletePage
dragdelete.gif
SortAndFixedPageOneRowsPage
ezgif.com-resize.gifone-line.gif

API

AutoDragSortableView、DragSortableView

isRequired if there is a * in the name field

nameProptypesDescription
dataSource *array
parentWidthnumberparent width
childrenHeight *numberEach item height
childrenWidth *numberEach item width
marginChildrenTopnumberSo the item's outermost view adds margin, you can only use this method.
marginChildrenBottomnumber
marginChildrenLeftnumber
marginChildrenRightnumber
sortableboolDo not allow dragging
onClickItemfuncclick
onDragStartfunc
onDragEndfunc
onDataChangefuncThis method is called every time the data changes.
renderItem *funcrender item view
fixedItemsarrayno remove
keyExtractorfunc(item,index) => key
delayLongPressnumber
isDragFreelyboolWhether to limit the drag space
onDraggingfunc
maxScalenumber
minOpacitynumber
The following attributes belong only to AutoDragSortableView
nameProptypesDescription
scaleDurationnumber
slideDurationnumber
autoThrottlenumber
autoThrottleDurationnumber
renderHeaderViewelement
headerViewHeightnumber
scrollIndicatorInsets({top:number, left:number, bottom:number, right:number})
renderBottomViewelement
bottomViewHeightnumber
onScrollListener(event: NativeSyntheticEvent) => void
onScrollRef(ref: any) => void

Example

<DragSortableView
    dataSource={this.state.data}
    parentWidth={parentWidth}
    childrenWidth= {childrenWidth}
    childrenHeight={childrenHeight}
    keyExtractor={(item,index)=> item.id}
    renderItem={(item,index)=>{
        return this.renderItem(item,index)
    }}
/>
    
<AutoDragSortableView
    dataSource={this.state.data}
    parentWidth={parentWidth}
    childrenWidth= {childrenWidth}
    childrenHeight={childrenHeight}
    keyExtractor={(item,index)=> item.id}
    renderItem={(item,index)=>{
        return this.renderItem(item,index)
    }}
/>

Keywords

FAQs

Package last updated on 08 Dec 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc