Skip to content

Commit

Permalink
Prevent torrent peers sorting when clicking column children elements
Browse files Browse the repository at this point in the history
  • Loading branch information
noefleury committed Nov 22, 2022
1 parent dc7f808 commit 2a5d3cf
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ const TorrentPeers: FC = () => {
};

const sortPeerByProperty = (event, property: TorrentPeerListColumn) => {

// don't do sorting when clicking on children elements
if (event.target !== event.currentTarget) return;

const {sortPeers: sortBy} = SettingStore.floodSettings;
const nextDirection: 'desc' | 'asc' = sortBy.direction === 'asc' ? 'desc': 'asc';
const newSortBy = {
Expand Down

0 comments on commit 2a5d3cf

Please sign in to comment.