Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to turn the sorting off for a clicked column in GridView with multisort #18826

Merged
merged 6 commits into from Aug 11, 2021

Conversation

ditibal
Copy link
Contributor

@ditibal ditibal commented Aug 11, 2021

Q A
Is bugfix?
New feature? ✔️
Breaks BC?
Tests pass? ✔️
Fixed issues #18599

@@ -438,14 +438,25 @@ public function createSortParam($attribute)
$definition = $this->attributes[$attribute];
$directions = $this->getAttributeOrders();
if (isset($directions[$attribute])) {
$direction = $directions[$attribute] === SORT_DESC ? SORT_ASC : SORT_DESC;
if ($this->enableMultiSort && count($directions) > 1) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be nice to have this feature when enableMultiSort is on even for one sortable column.

@bizley bizley added this to the 2.0.44 milestone Aug 11, 2021
@ditibal ditibal requested a review from bizley August 11, 2021 07:50
@bizley
Copy link
Member

bizley commented Aug 11, 2021

Tests need fixing. Also please add changelog line 👍🏻

@ditibal
Copy link
Contributor Author

ditibal commented Aug 11, 2021

Tests need fixing. Also please add changelog line 👍🏻

@bizley done

@bizley bizley merged commit 463a67b into yiisoft:master Aug 11, 2021
@bizley
Copy link
Member

bizley commented Aug 11, 2021

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants