mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Deselect on select state exit
This commit is contained in:
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user