mirror of
https://github.com/gosticks/react-table.git
synced 2026-08-19 08:20:30 +00:00
Compare commits
4
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9de149cf3c | ||
|
|
289dca1caf | ||
|
|
c6167566da | ||
|
|
5b0e68aead |
+1
-1
@@ -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",
|
||||
|
||||
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user