title: AutoComplete on select
body: <p>After I type something in input field, and then select the suggested value, js gets the value I typed, but I need the value I select. </p>
  
  <p>For example: I have a db with car names. I need to find some "Mercedes". I type letter 'M', it shows me 'Mercedes, Mazda, etc.'. After I select 'Mercedes', the js alerts me just 'M', while I need a full value.</p>
  
  <p>What should be edited? </p>
  
  <p><strong>View</strong></p>
  
  <pre><code>&lt;?= $form-&gt;field($model, 'name')
  -&gt;widget(\yii\jui\AutoComplete::classname(), [
                      'clientOptions' =&gt; [
                          'source' =&gt; array_values($suggest),
                          'select' =&gt; new JsExpression("function() {
                  var name = $(this).val();
                  alert(name);
               }")
                      ], 'options' =&gt; ['class' =&gt; 'searchinput', 'id' =&gt; 'searchByName'],
                  ])-&gt;label(false) ?&gt;
  </code></pre>