0
在卡尔蒂克的GridView我想与选择2型添加滤镜象下面这样:filterWidgetOptions无效(yii2)
[
'attribute' => 'product_id',
'value' => function ($model) {
return $model->product->name;
},
'filterType'=>GridView::FILTER_SELECT2,
'filter'=>ArrayHelper::map(\app\models\ProductWord::find()->asArray()->all(), 'name', 'name'),
'filterWidgetOptions'=>[
'pluginOptions'=>['allowClear'=>true, 'minimuminputLength' => 3],
],
'filterInputOptions'=>['placeholder'=>'Any Product', 'multiple' => true ],
'group'=>true, // enable grouping
'label' => 'Product',
'headerOptions' =>
['style'=>'max-width: 70%; font-size: 12px;overflow: auto; word-wrap: break-word;'],
'contentOptions' =>
['style'=>'max-width: 70%; font-size: 12px;overflow: auto; word-wrap: break-word;'],
],
但结果是filterWidgetOptions
不起作用。我想补充allowclear
和minimuminputLength
,但它不工作。我做什么错王氏代码?
谢谢