components icon indicating copy to clipboard operation
components copied to clipboard

Wrong arrow shown when using matSortStart=desc"

Open zisha opened this issue 9 years ago • 5 comments

Bug

When setting matSortStart=desc" direction is set to "desc" on the initial header click but the arrow shown in the header is the asc arrow

What is the expected behavior?

The desc arrow (pointing up) should be shown

What is the current behavior?

The asc arrow (pointing down) is shown

What are the steps to reproduce?

Set matSortStart=desc" and click on header

What is the use-case or motivation for changing an existing behavior?

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

@angular/cli: 1.4.1 node: 8.1.2 os: win32 x64 @angular/animations: 5.0.1 @angular/cdk: 5.0.0-rc0 @angular/common: 5.0.1 @angular/compiler: 5.0.1 @angular/core: 5.0.1 @angular/forms: 5.0.1 @angular/http: 5.0.1 @angular/material: 5.0.0-rc0 @angular/platform-browser: 5.0.1 @angular/platform-browser-dynamic: 5.0.1 @angular/platform-server: 5.0.1 @angular/router: 5.0.1 @angular/cli: 1.4.1 @angular/compiler-cli: 5.0.1 @angular/language-service: 4.3.6 typescript: 2.4.2

Is there anything else we should know?

zisha avatar Nov 09 '17 18:11 zisha

The ascending arrow is supposed to point up. See the Sorted column section in the spec.

willshowell avatar Nov 09 '17 18:11 willshowell

I see. To my mind an arrow pointing up means the values are increasing in value as they go up. I found a discussion about this here

zisha avatar Nov 09 '17 19:11 zisha

I guess there's a little room for interpretation, but the current implementation matches the material spec,

components-datatables-interaction-sortedcolumn (from the spec)

screen shot 2017-11-09 at 2 29 16 pm

(from the docs)

You can of course sort your own data however you wish.

willshowell avatar Nov 09 '17 19:11 willshowell

Closing as we are basing our orientation of the arrow based on the material spec.

josephperrott avatar Nov 09 '17 20:11 josephperrott

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.