Socket
Socket
Sign inDemoInstall

react-movable

Package Overview
Dependencies
6
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.5.1 to 2.5.2

8

lib/List.js

@@ -127,2 +127,3 @@ "use strict";

var opts = { passive: false };
listItemTouched.style.touchAction = 'none';
document.addEventListener('touchend', _this.schdOnEnd, opts);

@@ -135,2 +136,6 @@ document.addEventListener('touchmove', _this.schdOnTouchMove, opts);

document.addEventListener('mouseup', _this.schdOnEnd);
var listItemDragged = _this.getChildren()[_this.state.itemDragged];
if (listItemDragged && listItemDragged.style) {
listItemDragged.style.touchAction = '';
}
}

@@ -445,3 +450,2 @@ _this.onStart(listItemTouched, isTouch ? e.touches[0].clientX : e.clientX, isTouch ? e.touches[0].clientY : e.clientY, index);

userSelect: 'none',
touchAction: 'none',
WebkitUserSelect: 'none',

@@ -504,3 +508,3 @@ MozUserSelect: 'none',

overflow: 'hidden',
clip: 'react(0px, 0px, 0px, 0px)',
clip: 'rect(0px, 0px, 0px, 0px)',
clipPath: 'inset(100%)'

@@ -507,0 +511,0 @@ } }, this.state.liveText)));

@@ -18,28 +18,32 @@ /// <reference types="react" />

}
export interface RenderItemParams<Value> {
value: Value;
props: IItemProps;
index?: number;
isDragged: boolean;
isSelected: boolean;
isOutOfBounds: boolean;
}
export interface RenderListParams {
children: React.ReactNode;
isDragged: boolean;
props: {
ref: React.RefObject<any>;
};
}
export interface BeforeDragParams {
elements: Element[];
index: number;
}
export interface OnChangeMeta {
oldIndex: number;
newIndex: number;
targetRect: ClientRect;
}
export interface IProps<Value> {
beforeDrag?: (params: {
elements: Element[];
index: number;
}) => void;
renderItem: (params: {
value: Value;
props: IItemProps;
index?: number;
isDragged: boolean;
isSelected: boolean;
isOutOfBounds: boolean;
}) => React.ReactNode;
renderList: (props: {
children: React.ReactNode;
isDragged: boolean;
props: {
ref: React.RefObject<any>;
};
}) => React.ReactNode;
beforeDrag?: (params: BeforeDragParams) => void;
renderItem: (params: RenderItemParams<Value>) => React.ReactNode;
renderList: (props: RenderListParams) => React.ReactNode;
values: Value[];
onChange: (meta: {
oldIndex: number;
newIndex: number;
targetRect: ClientRect;
}) => void;
onChange: (meta: OnChangeMeta) => void;
transitionDuration: number;

@@ -46,0 +50,0 @@ removableByMove: boolean;

{
"name": "react-movable",
"version": "2.5.1",
"version": "2.5.2",
"description": "Drag and drop lists.",

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

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc