Skip to content

Commit 50647c4

Browse files
committed
Setting default sorting #21493
- Fixed default sort direction
1 parent d1ce6a4 commit 50647c4

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Orders.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@ protected function _construct()
6363
{
6464
parent::_construct();
6565
$this->setId('customer_orders_grid');
66-
$this->setDefaultSort('created_at', 'desc');
66+
$this->setDefaultSort('created_at');
67+
$this->setDefaultDir('desc');
6768
$this->setUseAjax(true);
6869
}
6970

app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/View/Cart.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@ protected function _construct()
7777
{
7878
parent::_construct();
7979
$this->setId('customer_view_cart_grid');
80-
$this->setDefaultSort('added_at', 'desc');
80+
$this->setDefaultSort('added_at');
81+
$this->setDefaultDir('desc');
8182
$this->setSortable(false);
8283
$this->setPagerVisibility(false);
8384
$this->setFilterVisibility(false);

0 commit comments

Comments
 (0)