0
我使用卡爾蒂克電網LIB在yii2yii2電網濾波器類型不工作
這工作。
[ 'attribute' => 'status', 'filterType' => GridView::FILTER_SELECT2, 'filter' => ['Active' => 'Active', 'In Active' => 'In Active'], 'filterWidgetOptions' => [ 'pluginOptions' => ['allowClear' => true], ], 'filterInputOptions' => ['placeholder' => 'Select'], ]
但這並不
[ 'attribute' => 'status', 'filterType' => '\kartik\widgets\Select2', 'filter' =>['Active' => 'Active', 'In Active' => 'In Active'], 'filterWidgetOptions' => [ 'pluginOptions' => ['allowClear' => true], ], 'filterInputOptions' => ['placeholder' => 'Select'], ]
爲什麼?我需要使用第2點方法。但它不起作用。
你確定''filterType'的值是這兩者之間的唯一區別嗎?它應該工作... – Bizley
是的,這是唯一的區別。 – Ish