Navigation Menu

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

fix(ui): flux sort no longer being overidden by default FE sort #16235

Merged
merged 3 commits into from Dec 16, 2019

Conversation

asalem1
Copy link
Contributor

@asalem1 asalem1 commented Dec 16, 2019

Closes #15980

Problem

The previous implementation was setting a default FE sort for columns if they existed without considering whether the results were already sorted

Solution

Removed the default sort assignment so that values are returned based on the flux query sorting. Added tests to ensure that default values are automatically sorted by _value

  • CHANGELOG.md updated with a link to the PR (not the Issue)

@asalem1 asalem1 requested a review from a team December 16, 2019 23:06
@ghost ghost requested review from desa and ebb-tide and removed request for a team December 16, 2019 23:06
return (
<div
style={this.style}
className={this.class}
onClick={this.handleClick}
data-column-index={columnIndex}
data-row-index={rowIndex}
{...(rowIndex === 0 ? {'data-testID': `${data}-table-header`} : {})} // conditionally adds test-ID for tableCell header
Copy link
Contributor

Choose a reason for hiding this comment

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

dang this is ugly

Copy link
Contributor Author

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

}
const headers = table.data[0]
Copy link
Contributor

Choose a reason for hiding this comment

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

what does this do?

Copy link
Contributor Author

Choose a reason for hiding this comment

The 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 undefined

Copy link
Contributor

Choose a reason for hiding this comment

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

weird

@asalem1 asalem1 merged commit ee89717 into master Dec 16, 2019
@asalem1 asalem1 deleted the flux-query-sort branch December 16, 2019 23:58
alexpaxton pushed a commit that referenced this pull request Jan 9, 2020
fix(ui): flux sort no longer being overidden by default FE sort
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Table View should display results as sorted by underlying flux query
2 participants