Socket
Socket
Sign inDemoInstall

react-swipeable-list

Package Overview
Dependencies
0
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.9.0 to 1.9.1

28

dist/react-swipeable-list.cjs.js

@@ -505,3 +505,3 @@ 'use strict';

if (_this.leadingActionsOpened && isIosType) {
if (_this.leadingActionsOpened && isIosType && to !== 0) {
_this.leadingActionsElement.className += ' test-actions-opened';

@@ -532,3 +532,3 @@ }

if (_this.trailingActionsOpened && isIosType) {
if (_this.trailingActionsOpened && isIosType && to !== 0) {
_this.trailingActionsElement.className += ' test-actions-opened';

@@ -955,2 +955,21 @@ }

_defineProperty(_assertThisInitialized(_this), "handleClick", function (event) {
if (_this.props.onClick) {
if (_this.leadingActionsOpened || _this.trailingActionsOpened || _this.isSwiping()) {
event.preventDefault();
return;
}
var delta = Math.abs(event.clientX - _this.dragStartPoint.x);
if (delta > 10) {
// If mouse moved more than threshold, ignore the click event
event.preventDefault();
return;
}
_this.props.onClick();
}
});
_this.state = initialState; // binded elements

@@ -1067,8 +1086,7 @@

leadingActions = _this$props4.leadingActions,
trailingActions = _this$props4.trailingActions,
onClick = _this$props4.onClick;
trailingActions = _this$props4.trailingActions;
return /*#__PURE__*/React__default["default"].createElement("div", {
className: clsx('swipeable-list-item', className),
ref: this.bindWrapperElement,
onClick: this.leadingActionsOpened || this.trailingActionsOpened ? undefined : onClick
onClick: this.handleClick
}, leadingActions && this.renderActions(leadingActions, 'leading', this.bindLeadingActionsElement), /*#__PURE__*/React__default["default"].createElement("div", {

@@ -1075,0 +1093,0 @@ className: "swipeable-list-item__content",

@@ -496,3 +496,3 @@ import React, { PureComponent } from 'react';

if (_this.leadingActionsOpened && isIosType) {
if (_this.leadingActionsOpened && isIosType && to !== 0) {
_this.leadingActionsElement.className += ' test-actions-opened';

@@ -523,3 +523,3 @@ }

if (_this.trailingActionsOpened && isIosType) {
if (_this.trailingActionsOpened && isIosType && to !== 0) {
_this.trailingActionsElement.className += ' test-actions-opened';

@@ -946,2 +946,21 @@ }

_defineProperty(_assertThisInitialized(_this), "handleClick", function (event) {
if (_this.props.onClick) {
if (_this.leadingActionsOpened || _this.trailingActionsOpened || _this.isSwiping()) {
event.preventDefault();
return;
}
var delta = Math.abs(event.clientX - _this.dragStartPoint.x);
if (delta > 10) {
// If mouse moved more than threshold, ignore the click event
event.preventDefault();
return;
}
_this.props.onClick();
}
});
_this.state = initialState; // binded elements

@@ -1058,8 +1077,7 @@

leadingActions = _this$props4.leadingActions,
trailingActions = _this$props4.trailingActions,
onClick = _this$props4.onClick;
trailingActions = _this$props4.trailingActions;
return /*#__PURE__*/React.createElement("div", {
className: clsx('swipeable-list-item', className),
ref: this.bindWrapperElement,
onClick: this.leadingActionsOpened || this.trailingActionsOpened ? undefined : onClick
onClick: this.handleClick
}, leadingActions && this.renderActions(leadingActions, 'leading', this.bindLeadingActionsElement), /*#__PURE__*/React.createElement("div", {

@@ -1066,0 +1084,0 @@ className: "swipeable-list-item__content",

@@ -504,3 +504,3 @@ (function (global, factory) {

if (_this.leadingActionsOpened && isIosType) {
if (_this.leadingActionsOpened && isIosType && to !== 0) {
_this.leadingActionsElement.className += ' test-actions-opened';

@@ -531,3 +531,3 @@ }

if (_this.trailingActionsOpened && isIosType) {
if (_this.trailingActionsOpened && isIosType && to !== 0) {
_this.trailingActionsElement.className += ' test-actions-opened';

@@ -954,2 +954,21 @@ }

_defineProperty(_assertThisInitialized(_this), "handleClick", function (event) {
if (_this.props.onClick) {
if (_this.leadingActionsOpened || _this.trailingActionsOpened || _this.isSwiping()) {
event.preventDefault();
return;
}
var delta = Math.abs(event.clientX - _this.dragStartPoint.x);
if (delta > 10) {
// If mouse moved more than threshold, ignore the click event
event.preventDefault();
return;
}
_this.props.onClick();
}
});
_this.state = initialState; // binded elements

@@ -1066,8 +1085,7 @@

leadingActions = _this$props4.leadingActions,
trailingActions = _this$props4.trailingActions,
onClick = _this$props4.onClick;
trailingActions = _this$props4.trailingActions;
return /*#__PURE__*/React__default["default"].createElement("div", {
className: clsx('swipeable-list-item', className),
ref: this.bindWrapperElement,
onClick: this.leadingActionsOpened || this.trailingActionsOpened ? undefined : onClick
onClick: this.handleClick
}, leadingActions && this.renderActions(leadingActions, 'leading', this.bindLeadingActionsElement), /*#__PURE__*/React__default["default"].createElement("div", {

@@ -1074,0 +1092,0 @@ className: "swipeable-list-item__content",

2

package.json
{
"name": "react-swipeable-list",
"description": "Swipeable list component for React",
"version": "1.9.0",
"version": "1.9.1",
"author": {

@@ -6,0 +6,0 @@ "name": "Marek Rozmus",

@@ -27,3 +27,3 @@ <h1 align="center">react-swipeable-list</h1>

<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
[![All Contributors](https://img.shields.io/badge/all_contributors-9-orange.svg?style=flat-square)](#contributors-)
[![All Contributors](https://img.shields.io/badge/all_contributors-10-orange.svg?style=flat-square)](#contributors-)
<!-- ALL-CONTRIBUTORS-BADGE:END -->

@@ -309,2 +309,3 @@ <!-- prettier-ignore-end -->

<td align="center" valign="top" width="14.28%"><a href="https://www.linkedin.com/in/lucas-furini-42b144158/"><img src="https://avatars.githubusercontent.com/u/30937569?v=4?s=100" width="100px;" alt="Lucas Furini"/><br /><sub><b>Lucas Furini</b></sub></a><br /><a href="#ideas-lucaskab" title="Ideas, Planning, & Feedback">🤔</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/canberkakartuna"><img src="https://avatars.githubusercontent.com/u/42892180?v=4?s=100" width="100px;" alt="Canberk Akartuna"/><br /><sub><b>Canberk Akartuna</b></sub></a><br /><a href="https://github.com/marekrozmus/react-swipeable-list/issues?q=author%3Acanberkakartuna" title="Bug reports">🐛</a></td>
</tr>

@@ -311,0 +312,0 @@ </tbody>

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