Skip to content

Commit

Permalink
Unset tomSelect after destroying the instance
Browse files Browse the repository at this point in the history
fix #407
  • Loading branch information
janklan committed Aug 7, 2022
1 parent 8e84d49 commit 01916e6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Autocomplete/assets/src/controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ export default class extends Controller {

disconnect() {
this.tomSelect.destroy();
// Fixes https://github.com/symfony/ux/issues/407
this.tomSelect = undefined;
}

#getCommonConfig(): Partial<TomSettings> {
Expand Down

0 comments on commit 01916e6

Please sign in to comment.