diff --git a/.size-snapshot.json b/.size-snapshot.json index c9357da..f23b05f 100644 --- a/.size-snapshot.json +++ b/.size-snapshot.json @@ -1,13 +1,13 @@ { "dist/index.js": { - "bundled": 104527, - "minified": 48274, - "gzipped": 12949 + "bundled": 104689, + "minified": 48426, + "gzipped": 13003 }, "dist/index.es.js": { - "bundled": 103640, - "minified": 47484, - "gzipped": 12791, + "bundled": 103802, + "minified": 47636, + "gzipped": 12848, "treeshaked": { "rollup": { "code": 80, diff --git a/README.md b/README.md index cb8d71a..b54eb14 100644 --- a/README.md +++ b/README.md @@ -182,6 +182,7 @@ This library is being built and maintained by me, @tannerlinsley and I am always
  • Robert TajnÅ¡ek
  • Pekka Tapani
  • Eric Lanehart (@pushred)
  • +
  • Anish P Patel (@anishpatelyaadada)
  • diff --git a/docs/api/useSortBy.md b/docs/api/useSortBy.md index 2684767..79270f9 100644 --- a/docs/api/useSortBy.md +++ b/docs/api/useSortBy.md @@ -17,7 +17,7 @@ The following options are supported via the main options object passed to `useTa - `initialState.sortBy: Array>` - Must be **memoized** - An array of sorting objects. If there is more than one object in the array, multi-sorting will be enabled. Each sorting object should contain an `id` key with the corresponding column ID to sort by. An optional `desc` key may be set to true or false to indicated ascending or descending sorting for that column. This information is stored in state since the table is allowed to manipulate the filter through user interaction. -- `manualSorting: Bool` +- `manualSortBy: Bool` - Enables sorting detection functionality, but does not automatically perform row sorting. Turn this on if you wish to implement your own sorting outside of the table (eg. server-side or manual row grouping/nesting) - `disableSortBy: Bool` - Disables sorting for every column in the entire table. diff --git a/sizes-cjs.json b/sizes-cjs.json index 8bba4bc..adc8d5e 100644 --- a/sizes-cjs.json +++ b/sizes-cjs.json @@ -1,4 +1,24 @@ [ + { + "timestamp": 1576165979638, + "files": [ + { + "filename": "index.js", + "size": 22689, + "delta": 135 + } + ] + }, + { + "timestamp": 1576044489324, + "files": [ + { + "filename": "index.js", + "size": 22554, + "delta": -79 + } + ] + }, { "timestamp": 1576020969676, "files": [ diff --git a/sizes-es.json b/sizes-es.json index b87dd05..d30baad 100644 --- a/sizes-es.json +++ b/sizes-es.json @@ -1,4 +1,24 @@ [ + { + "timestamp": 1576165986389, + "files": [ + { + "filename": "index.es.js", + "size": 22515, + "delta": 140 + } + ] + }, + { + "timestamp": 1576044496748, + "files": [ + { + "filename": "index.es.js", + "size": 22375, + "delta": -76 + } + ] + }, { "timestamp": 1576020979047, "files": [ diff --git a/src/publicUtils.js b/src/publicUtils.js index 347801e..ec6de3d 100644 --- a/src/publicUtils.js +++ b/src/publicUtils.js @@ -260,6 +260,18 @@ function isFunctionComponent(component) { return typeof component === 'function' } -function isReactComponent(component) { - return isClassComponent(component) || isFunctionComponent(component) +function isExoticComponent(component) { + return ( + typeof component === 'object' && + typeof component.$$typeof === 'symbol' && + ['react.memo', 'react.forward_ref'].includes(component.$$typeof.description) + ) +} + +function isReactComponent(component) { + return ( + isClassComponent(component) || + isFunctionComponent(component) || + isExoticComponent(component) + ) }