react-bootstrap-table/react-bootstrap-table2

defaultSorted cannot sort more than one column

オープン

#1,083 opened on 2019/09/03

 (4 件のコメント) (2 件のリアクション) (1 人の担当者)JavaScript (415 件のフォーク)batch import
help wantedsort

Repository metrics

Stars
 (1,249 個のスター)
PR merge metrics
 (30d に merged PR はありません)

説明

Describe the bug Only the first column of the defaultSorted array is considered. I see #717 was closed, but neither the documentation nor the linked example contains two columns in defaultSorted.

codesandbox https://codesandbox.io/embed/react-bootstrap-table-next-basic-example-69nq0

Note that the second sort column is on price descending, so the row with id 2 should be displayed first.

In general, the expected behavior here is that the table is first sorted by name, and then for items with the same name, they should be ordered by price in descending.

Happy to provide more examples as needed.

コントリビューターガイド