Fixed issue where enabling bulk selection, then disabling it, resulted in subsequent bulk actions not applying to any items

This commit is contained in:
Matthew Barbour
2020-06-21 18:25:23 -05:00
committed by Shish
parent 919a3039c4
commit 7c32b1f7a8
2 changed files with 7 additions and 2 deletions

View File

@ -53,6 +53,7 @@ function deactivate_bulk_selector() {
set_selected_items([]);
$('#bulk_selector_controls').hide();
$('#bulk_selector_activate').show();
$('input[name="bulk_selected_ids"]').val("");
bulk_selector_active = false;
}
@ -94,7 +95,6 @@ function deselect_item(id) {
function toggle_selection( id ) {
var data = get_selected_items();
console.log(id);
if(data.includes(id)) {
data.splice(data.indexOf(id),1);
set_selected_items(data);