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 - npm Package Compare versions

Comparing version 2.2.4 to 2.3.4

12

AutoDragSortableView.js

@@ -206,3 +206,4 @@ import React, {Component} from 'react'

if (this.sortRefs.has(touchIndex)) {
const key = this._getKey(touchIndex);
if (this.sortRefs.has(key)) {

@@ -229,3 +230,3 @@ // Initialization data

this.touchCurItem = {
ref: this.sortRefs.get(touchIndex),
ref: this.sortRefs.get(key),
index: touchIndex,

@@ -612,2 +613,7 @@ originLeft: this.state.dataSource[touchIndex].originLeft,

_getKey = (index) => {
const item = this.state.dataSource[index];
return this.props.keyExtractor ? this.props.keyExtractor(item.data, index) : item.originIndex;
}
_renderItemView = () => {

@@ -621,3 +627,3 @@ return this.state.dataSource.map((item,index)=>{

key={key}
ref={(ref) => this.sortRefs.set(index,ref)}
ref={(ref) => this.sortRefs.set(key,ref)}
{...this._panResponder.panHandlers}

@@ -624,0 +630,0 @@ style={[styles.item,{

@@ -118,3 +118,4 @@ import React, {Component} from 'react'

if (this.sortRefs.has(touchIndex)) {
const key = this._getKey(touchIndex);
if (this.sortRefs.has(key)) {
if (this.props.onDragStart) {

@@ -132,3 +133,3 @@ this.props.onDragStart(touchIndex)

this.touchCurItem = {
ref: this.sortRefs.get(touchIndex),
ref: this.sortRefs.get(key),
index: touchIndex,

@@ -421,2 +422,7 @@ originLeft: this.state.dataSource[touchIndex].originLeft,

_getKey = (index) => {
const item = this.state.dataSource[index];
return this.props.keyExtractor ? this.props.keyExtractor(item.data, index) : item.originIndex;
}
_renderItemView = () => {

@@ -426,7 +432,7 @@ return this.state.dataSource.map((item,index)=>{

transformObj[this.props.scaleStatus] = item.scaleValue
const key = this.props.keyExtractor ? this.props.keyExtractor(item.data,index) : item.originIndex
const key = this._getKey(index);
return (
<Animated.View
key={key}
ref={(ref) => this.sortRefs.set(index,ref)}
ref={(ref) => this.sortRefs.set(key,ref)}
{...this._panResponder.panHandlers}

@@ -433,0 +439,0 @@ style={[styles.item,{

{
"name": "react-native-drag-sort",
"version": "2.2.4",
"version": "2.3.4",
"description": "Drag and drop sort control for react-native",

@@ -5,0 +5,0 @@ "main": "index.js",

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