Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bug #409 Unset TomSelect after destroying the Stimulus Controller (ja…
…nklan) This PR was merged into the 2.x branch. Discussion ---------- Unset TomSelect after destroying the Stimulus Controller | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | Tickets | [407](#407) | License | MIT Sometimes Stimulus re-uses an instance of a controller after it's destroyed and re-created - for example when a Live Twig Component re-renders. Without unsetting the variable, [connect() method thinks TomSelect is already in place, and does nothing](https://github.com/symfony/ux/blob/2.x/src/Autocomplete/assets/src/controller.ts#L21-L25). Commits ------- 01916e6 Unset tomSelect after destroying the instance
- Loading branch information