From 20e0cc5cbbd2d752bbc41cdc832e13c2193e80a8 Mon Sep 17 00:00:00 2001 From: psychobunny Date: Wed, 7 Oct 2020 11:59:45 -0400 Subject: [PATCH] fix: sorted list delete button --- public/src/modules/settings/sorted-list.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/public/src/modules/settings/sorted-list.js b/public/src/modules/settings/sorted-list.js index da638ca5e6..a58487e15d 100644 --- a/public/src/modules/settings/sorted-list.js +++ b/public/src/modules/settings/sorted-list.js @@ -64,10 +64,9 @@ define('settings/sorted-list', ['benchpress', 'jqueryui'], function (benchpress) }; function setupRemoveButton($container, itemUUID) { - var key = $container.attr('data-sorted-list'); - - var removeBtn = $('[data-sorted-list="' + key + '"] [data-type="remove"]'); + var removeBtn = $container.find('[data-sorted-list-uuid="' + itemUUID + '"] [data-type="remove"]'); removeBtn.on('click', function () { + console.log(itemUUID); $('[data-sorted-list-uuid="' + itemUUID + '"]').remove(); }); }