-
Notifications
You must be signed in to change notification settings - Fork 16
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 sortByColumnType param to fix number sorting in TableWidget #593
Conversation
Pull Request Test Coverage Report for Build 4106367214
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -21,20 +25,21 @@ export function applySorting(features, { sortBy, sortByDirection = 'asc' } = {}) | |||
if (!isValidSortBy) { | |||
throw new Error('Sorting options are bad formatted'); | |||
} | |||
|
|||
const isNumberColumn = sortByColumnType === 'integer' || sortByColumnType === 'float'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this should be better a simple 'number'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍🏻
TableWidget - sortByColumnType param + number format
Shortcut: https://app.shortcut.com/cartoteam/story/286648/ac-x5e68ikj-table-widget-ordering-is-wrong-for-numeric-data-type-column
TableWidget accepts a new
sortByColumnType
parameter, if its value isinteger or float'number' we will apply number sortingTableWidgetSorting.mov
Type of change
Acceptance
Sorting by a number column should work properly