question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Sorting direction icon doesn't show up when useExternal is set

See original GitHub issue

Using Griddle, I’m loading data externally by setting useExternal to true, and I found that it doesn’t render the sorting direction icon when header cell is clicked for sorting. The data sorting works with externalChangeSort but the icon doesn’t just show up.

I found some related code on line 80 in /modules/gridTitle.jsx.js

if (that.props.sortSettings.sortColumn == col && that.props.sortSettings.sortDirection === 'asc') {
                columnSort = that.props.sortSettings.sortAscendingClassName;

Here the sortDirection is always null when useExternal is set to true.

And inside changeSort function in /modules/griddle.jsx.js, it won’t set state of sortDirection simply returning when useExternal is set.

if (this.props.useExternal) {
    this.props.externalChangeSort(column, this.props.externalSortColumn === column ? !this.props.externalSortAscending : true);
    return;
}

Looking forward to have a quick fix on this.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
tatethurstoncommented, Oct 7, 2016

Fixed 486.

0reactions
M3lkiorcommented, Sep 7, 2016

Same issue here …

Read more comments on GitHub >

github_iconTop Results From Across the Web

Use up or down arrow to represent "sort ascending" at table ...
But according to the question, both up and down arrows can be interpreted as "ascending", while in both cases indicating the criterion currently ......
Read more >
Sort and arrange items in the Finder on Mac - Apple Support
Sort and arrange items in the Finder on Mac. There are four ways to view items in a Finder window: as icons, as...
Read more >
Sort data in a PivotTable or PivotChart - Microsoft Support
Sorting data is helpful when you have large amounts of data in a PivotTable or PivotChart. You can sort in alphabetical order, from...
Read more >
Which direction should the arrows point in a sorted table?
I don't think of them as arrows, but as a visual mnemonic of the current state. So, showing a triangle pointing down shows...
Read more >
Row Sorting - ag-Grid (Vue)
To enable sorting for all columns, set sorting in the default column ... When the Year column is not sorted, it shows a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found