How to realize ajax on a form element with autocomplete I have a form textfield element, which contains autocomplete feature using #autocomplete_route_name. 

Could you clarify me, how to call ajax function when the textfield value has been set via autocomplete ? That is, for example, an user has selected a value from the autocomplete list, set it into the textbox and right away something should be executed via ajax depending on new value of the textbox.

Which ajax event should I use for it ?
I managed to find the solution.
My code works with an event "autocompleteselect".

Here's an example of code

$form['autocomplete_field'] = [
            '#type' =&gt; 'textfield',
            '#title' =&gt; t('Autocomplete search'),
            '#autocomplete_route_name' =&gt; 'autocomplete_route',
            '#ajax' =&gt; [
                'callback' =&gt; '::ajaxFunctionAfterAutocomplete',
                'event' =&gt; 'autocompleteselect',
            ]
        ];