См. также: http://twitter.github.io/typeahead.js/
С версии: 2.0
Автор: Qiang Xue (qiang.xue@gmail.com)
Наследование: extends yii\web\AssetBundle
Пример #1
0
 /**
  * @inheritdoc
  */
 protected function registerPlugin($name)
 {
     $view = $this->getView();
     TypeAheadAsset::register($view);
     $id = $this->options['id'];
     if ($this->clientOptions !== false) {
         $options = empty($this->clientOptions) ? 'null' : Json::htmlEncode($this->clientOptions);
         $dataSource = Json::htmlEncode($this->getDataSource());
         $js = "jQuery('#{$id}').{$name}({$options}, {$dataSource});";
         $view->registerJs($js);
     }
     $this->registerClientEvents();
 }