Skip to content

Commit ba13d56

Browse files
committed
adding comment
1 parent df17f86 commit ba13d56

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Autocomplete/assets/src/controller.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,9 @@ export default class extends Controller {
8686

8787
disconnect() {
8888
this.stopMutationObserver();
89+
90+
// TomSelect.destroy() resets the element to its original HTML. This
91+
// causes the selected value to be lost. We store it.
8992
let currentSelectedValues: string[] = [];
9093
if (this.selectElement) {
9194
if (this.selectElement.multiple) {

0 commit comments

Comments
 (0)