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

v1.18.x
Julian Lam 4 years ago
parent 6c3b1fde87
commit 4029ec3713

@ -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);
});
}
});

@ -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();
});
}

Loading…
Cancel
Save