title: Yii2 AutoComplete in GridView
body: <p>I've installed yii2-jui via composer.</p>
  
  <p>I would like to use AutoComplete in 2 different models, once in mother, once in a foreign model. It's about Lands.</p>
  
  <p>Now in mother (views/land/index):</p>
  
  <pre><code>use yii\jui\AutoComplete;
  use app\models\Land;
  
  [
      'attribute' =&gt; 'name',
      'filter' =&gt; AutoComplete::widget([
          'model' =&gt; $searchModel,
          'attribute' =&gt; 'name',
          'clientOptions' =&gt; [
              'source' =&gt; ArrayHelper::map(Land::find()-&gt;select('id, name')-&gt;orderBy('name')-&gt;all(), 'id', 'name'),
              'autoFill' =&gt; true,
              'minLength' =&gt; 2
          ],
      ]),
  ],
  </code></pre>
  
  <p>The problem is, that it doesn't work, because of orderBy of course the keys are not from zero upwards. As soon as I reset keys, it begins to work. Now in mother it's not "really" a problem (actually it IS still a problem), but as soon as I want to use it in a "foreign" model, where I have to search actually for a key (id), instead of the name of the Land, it wont work. What am I missing? Can you please point me to the right direction? Many thanks!</p>