Deselect on select state exit
This commit is contained in:
parent
c584da2ea9
commit
2d42882a4b
|
@ -418,8 +418,13 @@ class BulkEditOverlay {
|
||||||
|
|
||||||
dismissCharacter = characterId => this.#selectedCharacters = this.selectedCharacters.filter(item => String(characterId) !== item);
|
dismissCharacter = characterId => this.#selectedCharacters = this.selectedCharacters.filter(item => String(characterId) !== item);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Clears internal character storage and
|
||||||
|
* removes visual highlight.
|
||||||
|
*/
|
||||||
clearSelectedCharacters = () => {
|
clearSelectedCharacters = () => {
|
||||||
this.selectedCharacters.forEach(characterId => document.querySelector('.character_select[chid="' + characterId + '"]')?.classList.remove(BulkEditOverlay.selectedClass))
|
document.querySelectorAll('#' + BulkEditOverlay.containerId + ' .' + BulkEditOverlay.selectedClass)
|
||||||
|
.forEach( element => element.classList.remove(BulkEditOverlay.selectedClass));
|
||||||
this.selectedCharacters.length = 0;
|
this.selectedCharacters.length = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue