Commit 53421dd
committed
bug #409 Unset TomSelect after destroying the Stimulus Controller (janklan)
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 instance1 file changed
+2
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
| 45 | + | |
44 | 46 | | |
45 | 47 | | |
46 | 48 | | |
| |||
0 commit comments