I have an issue about kartik select2 filterType that doesn't work , this is a portion of my code :
[
'format' => ['link',$idmodel],
'attribute' =>$attribute,
'filterType'=>GridView::FILTER_SELECT2,
'filterWidgetOptions' => [
'data' => \yii\helpers\ArrayHelper::map($model_::find()->all(),$attribute,'nom_'.strtolower($idmodel)),
'options' => ['placeholder' => '-'.$idmodel.'-'],
'pluginOptions' => ['allowClear' => true],
'theme' => Select2::THEME_KRAJEE,
],
When i comment this line :
'filterType'=>GridView::FILTER_SELECT2,
a text field appear in my filter grid view. Can any one help me ?? Thanks in advance
As I see it from your conversation with Edvin Tenovimas your problem is that no jQuery Javascript file is loaded. Did you installed the Select2 package normally with composer?
In that case you have to see the file
vendor/bower/jquery/dist/jquery.min.js
. The file has to be copied into your assets directory underweb/assets
automatically. You could remove the content of the assets directories to force the creation of the assets again.