Skip to content

Commit

Permalink
Merge pull request #59 from marekrozmus/fix_for_issue_53
Browse files Browse the repository at this point in the history
fix(53): use correct id for clicked item
  • Loading branch information
marekrozmus authored Nov 4, 2023
2 parents 86bfb08 + ebec501 commit 39de509
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,5 @@ dist

# TernJS port file
.tern-port

.vscode
3 changes: 2 additions & 1 deletion src/SwipeableListItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ class SwipeableListItem extends PureComponent {

handleDragStart = ({ clientX, clientY }) => {
if (this.props.clickedCallback) {
this.props.clickedCallback(this.props.id);
this.props.clickedCallback(this.id);
}

if (!this.leadingActionsOpened && !this.trailingActionsOpened) {
Expand Down Expand Up @@ -830,6 +830,7 @@ class SwipeableListItem extends PureComponent {
return (
<div
className={clsx('swipeable-list-item', className)}
id={this.id}
ref={this.bindWrapperElement}
onClick={this.handleClick}
>
Expand Down

0 comments on commit 39de509

Please sign in to comment.