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.

Sort not working, don't quite understand the error message

See original GitHub issue

Hi there!

I’m getting this error when I try to sort on a column, not quite sure what it means

The type of sort field and order should be both with String or Array

I have provided a sortFunc

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
victorkirovcommented, Jan 31, 2017

@cheapsteak No worries, it happens to all of us 😛

As for your initial error: The type of sort field and order should be both with String or Array

If you specify an initial sort order in the options then you have to specify both sortName and sortOrder. If not using multiColumnSort then you can specify them as string: <BootstrapTable options={{ sortName: ‘periodDownloads’, sortOrder: ‘asc’ }}> … </ BootstrapTable>

If using multiColumnSort then you can specify more than one column to sort on and BOTH sortName and sortOrder should be arrays: <BootstrapTable multiColumnSort={2} options={{ sortName: [‘periodDownloads’, ‘allTimeDownloads’], sortOrder: [‘asc’, ‘desc’] }}> … </ BootstrapTable>

This will sort primarily on allTimeDownloads and then on periodDownloads.

Hope that helps

0reactions
cheapsteakcommented, Jan 31, 2017

Oh my god. So sorry about that X|

Read more comments on GitHub >

github_iconTop Results From Across the Web

Array sort is not working correctly in JavaScript - Stack Overflow
The code above will return the array sorted from smallest to largest correctly. You can sort largest to smallest (descending order) by reversing ......
Read more >
Problems view: Sort by message · Issue #98819 - GitHub
Sorting by error type allows us to understand how widespread each compile error is and prioritise those in order of number of occurrences...
Read more >
"Failed to load data" error when sorting attribute table
Each time I try to sort an attribute table by right-clicking the ... Since I've had so many issues and still don't quite...
Read more >
Sorting is not working - Tableau Community
I don't think you can get what you want just using the sort buttons, unfortunately. If someone else on the forums knows how...
Read more >
SORT Error Messages - System Software Utilities ... - Unisys
When a restartable sort is not able to continue, it saves restart information so that this error occurs during subsequent restart attempts. You...
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