Skip to content

Commit

Permalink
fix(53): use correct id for clicked item
Browse files Browse the repository at this point in the history
  • Loading branch information
marekrozmus committed Nov 4, 2023
1 parent 86bfb08 commit ebec501
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 ebec501

Please sign in to comment.