mirror of
https://github.com/gosticks/react-table.git
synced 2025-10-16 11:55:36 +00:00
Merge branch 'master' of https://github.com/react-tools/react-table
This commit is contained in:
commit
289dca1caf
@ -22,7 +22,7 @@ const propTypes = {
|
||||
columns: PropTypes.arrayOf(
|
||||
PropTypes.shape({
|
||||
sortByFn: PropTypes.func,
|
||||
efaultSortDesc: PropTypes.bool
|
||||
defaultSortDesc: PropTypes.bool
|
||||
})
|
||||
),
|
||||
sortByFn: PropTypes.func,
|
||||
@ -82,7 +82,8 @@ export const useSortBy = props => {
|
||||
|
||||
if (!multi) {
|
||||
if (sortBy.length <= 1 && existingSortBy) {
|
||||
if (existingSortBy.desc) {
|
||||
if ((existingSortBy.desc && !resolvedDefaultSortDesc) ||
|
||||
(!existingSortBy.desc && resolvedDefaultSortDesc)) {
|
||||
action = 'remove'
|
||||
} else {
|
||||
action = 'toggle'
|
||||
|
||||
Loading…
Reference in New Issue
Block a user