predixdesignsystem / px-data-grid

Predix UI component which defines a data grid
https://www.predix-ui.com/#/elements/px-data-grid
Apache License 2.0
12 stars 20 forks source link

Columns can take default sorting #804

Closed sgoodrow closed 6 years ago

sgoodrow commented 6 years ago

Enables default sorting by setting column.defaultSortOrder and column.defaultSortDirection.

If the properties are not specified, there is no change: nodefaultsortorderdeclared

In single-sort tables, set column.defaultSortDirection = "asc" or "desc" to enable default sorting: defaultsortordersingle

In multi-sort tables, set column.defaultSortDirection = "asc" or "desc" and set column.defaultSortOrder = 1..n to specify the sort priorities: defaultsortorder

This only changes initial sort order. Users can still change the sort behavior as before.

cla-bot[bot] commented 6 years ago

Thank you for your pull request. We require contributors to sign our Contributor License Agreement here.

sgoodrow commented 6 years ago

single-sort working well multi-sort has a problem: default sort is not respecting the specified default sort order, only the column declaration order.