Open doublehops opened 7 years ago
In view index.php... add in clientOptions "order"=>[[column,"type"]] example: <?= DataTables::widget([ 'dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'clientOptions' => [ // "lengthMenu"=> [[20,-1], [20,Yii::t('app',"All")]], "info"=>true, "responsive"=>true, "order"=> [[ 2, "desc" ]]
I have the following in the model's search method:
This works fine with GridView::widget but seems to be ignored by DataTables. Is this a known problem? I'm having trouble finding the cause.