-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
fix(ui): flux sort no longer being overidden by default FE sort #16235
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -81,16 +81,9 @@ class TableGraph extends PureComponent<Props, State> { | |
|
||
if (headerSet.has(sortOptions.field)) { | ||
return sortOptions | ||
} else if (headerSet.has('_time')) { | ||
return {...sortOptions, field: '_time'} | ||
} else if (headerSet.has('_start')) { | ||
return {...sortOptions, field: '_start'} | ||
} else if (headerSet.has('_stop')) { | ||
return {...sortOptions, field: '_stop'} | ||
} else { | ||
const headers = table.data[0] | ||
return {...sortOptions, field: headers[0]} | ||
} | ||
const headers = table.data[0] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what does this do? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this was the initial default statement set for filtering. While the intention of it is not clear to me, the function of it is to set the default sort to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. weird |
||
return {...sortOptions, field: headers[0]} | ||
} | ||
} | ||
|
||
|
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.
dang this is ugly
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.
Ya but it’s less that conditionally rendering a component with 1 added prop / adding a testID unnecessarily and sullying the DOM