Follow the "Extending Tom Select" section of the Symfony UX Autocomplete documentation:
https://symfony.com/bundles/ux-autocomplete/current/index.html#extending-tom-select
Option A
Add onDropdownOpen option to the options object on the autocomplete:pre-connect event
Option B
Add dropdown_open listener inside the autocomplete:connect event (the TomSelect is already initialized here)