Compare commits

...
Author SHA1 Message Date
tannerlinsley 9de149cf3c v7.0.0-alpha.5 2019-06-11 11:41:38 -06:00
tannerlinsley 289dca1caf Merge branch 'master' of https://github.com/react-tools/react-table 2019-06-11 11:41:07 -06:00
HellycatandTanner Linsley c6167566da Fix misspelled in propTypes (#1353) 2019-05-31 07:18:26 -06:00
Dmitrii GaidarjiandTanner Linsley 5b0e68aead 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
2019-05-31 07:17:58 -06:00
2 changed files with 4 additions and 3 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "react-table",
"version": "7.0.0-alpha.4",
"version": "7.0.0-alpha.5",
"description": "A fast, lightweight, opinionated table and datagrid built on React",
"license": "MIT",
"homepage": "https://github.com/tannerlinsley/react-table#readme",
+3 -2
View File
@@ -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'