0
我的設置列使用kartik DynaGrid Widget在yii2上顯示數據。但過濾器(FILTER_SELECT2)不在我的桌子上呈現。有人能幫我嗎?請。kartik DynaGrid select2 filter not render
'class' => 'kartik\grid\DataColumn',
'attribute' => 'city_id',
'label' => 'City',
'hAlign' => 'center',
'vAlign' => 'middle',
'width' => '70px',
'filterType' => GridView::FILTER_SELECT2,
'filter' => [
1 => 'filter 1',
2 => 'filter 2',
],
'format' => 'html',
'value' => function($data){
$cities = \app\models\City::getData();
if(isset($cities[$data->city_id])){
return $cities[$data->city_id];
}
return $data->city_id;
}