mirror of
https://github.com/gosticks/react-table.git
synced 2026-02-26 18:42:46 +00:00
Fix defaultSortDesc blocking toggle action (#1341)
* Fix defaultSortDesc blocking toggle action * Revert "Fix defaultSortDesc blocking toggle action" This reverts commit 15e05cefd820e3f63e80a8e9d31b9431f295b55a. * Fix defaultSortDesc blocking toggle action
This commit is contained in:
parent
2f5ebe460f
commit
5b0e68aead
@ -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