AllenFang / AllenFang/react-bootstrap-table

Default sorting not working: sortFunc not called for defaultSortName column

Open
#1,373 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
2.2k
Forks
761
PR merge metrics
No merged PRs in 30d

Description

I have too much code to show it all, but its basically like the "Custom Sort with Extra Data" example. Only I want to sort on the "Product Quality" column by default. In my options I have basically:

Object.assign( options, {
defaultSortName : 'quality',
defaultSortOrder: 'asc'
} );

I stop in Chrome debugger and see the options being set. But I still always sort on the first column. Only when I click on the header to sort on the "Product Quality" column do I stop in my sortFunc -- it works then so I know the problem isn't with the sortFunc itself.

Any thoughts?
-= Jab

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.