fix: multiple sorted-lists do not save to the correct set

This commit is contained in:
Julian Lam
2021-01-29 13:36:50 -05:00
parent 6c3b1fde87
commit 4029ec3713
2 changed files with 3 additions and 2 deletions

View File

@@ -531,7 +531,9 @@ define('settings', function () {
helper.whenReady(function () {
var list = formEl.find('[data-sorted-list]');
if (list.length) {
getHook(list, 'set').call(Settings, list, values);
list.each((idx, item) => {
getHook(item, 'set').call(Settings, $(item), values);
});
}
});

View File

@@ -70,7 +70,6 @@ define('settings/sorted-list', [
function setupRemoveButton($container, itemUUID) {
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();
});
}