mirror of
https://github.com/yiisoft/yii2.git
synced 2026-03-22 23:17:12 +01:00
Fix #7622: Allow yii\data\ArrayDataProvider to control the sort flags for sortModels through yii\data\Sort::sortFlags property
This commit is contained in:
@@ -136,7 +136,7 @@ class ArrayDataProvider extends BaseDataProvider
|
||||
{
|
||||
$orders = $sort->getOrders();
|
||||
if (!empty($orders)) {
|
||||
ArrayHelper::multisort($models, array_keys($orders), array_values($orders));
|
||||
ArrayHelper::multisort($models, array_keys($orders), array_values($orders), $sort->sortFlags);
|
||||
}
|
||||
|
||||
return $models;
|
||||
|
||||
Reference in New Issue
Block a user