Fix clearing selected tag when removed from last item in view
I somehow broke this in d2f028d797
, though
I'm not sure how.
This commit is contained in:
parent
d60b0221db
commit
4e1fbf9747
1 changed files with 8 additions and 10 deletions
|
@ -279,6 +279,14 @@
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If tag isn't in scope and is still selected,
|
||||||
|
// deselect it
|
||||||
|
if (!inScope && self.selection[labels[i].value]) {
|
||||||
|
labels[i].setAttribute('selected', false);
|
||||||
|
delete self.selection[labels[i].value];
|
||||||
|
var doCommand = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// If not in filter, hide
|
// If not in filter, hide
|
||||||
|
@ -303,16 +311,6 @@
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
labels[i].setAttribute('inScope', false);
|
labels[i].setAttribute('inScope', false);
|
||||||
|
|
||||||
// If out of scope, make sure it's not selected (otherwise a tag
|
|
||||||
// stays selected after removing an item with that tag from the
|
|
||||||
// current collection)
|
|
||||||
if (self.selection[labels[i].value]) {
|
|
||||||
labels[i].setAttribute('selected', false);
|
|
||||||
delete self.selection[labels[i].value];
|
|
||||||
var doCommand = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
labels[i].setAttribute('hidden', false);
|
labels[i].setAttribute('hidden', false);
|
||||||
|
|
Loading…
Reference in a new issue