This commit is contained in:
Tanner Linsley 2019-12-13 00:25:27 -07:00
parent 9fa1396f26
commit 81dcfd8dec
6 changed files with 62 additions and 9 deletions

View File

@ -1,13 +1,13 @@
{ {
"dist/index.js": { "dist/index.js": {
"bundled": 104527, "bundled": 104689,
"minified": 48274, "minified": 48426,
"gzipped": 12949 "gzipped": 13003
}, },
"dist/index.es.js": { "dist/index.es.js": {
"bundled": 103640, "bundled": 103802,
"minified": 47484, "minified": 47636,
"gzipped": 12791, "gzipped": 12848,
"treeshaked": { "treeshaked": {
"rollup": { "rollup": {
"code": 80, "code": 80,

View File

@ -182,6 +182,7 @@ This library is being built and maintained by me, @tannerlinsley and I am always
<li>Robert Tajnšek</li> <li>Robert Tajnšek</li>
<li>Pekka Tapani</li> <li>Pekka Tapani</li>
<li>Eric Lanehart (@pushred)</li> <li>Eric Lanehart (@pushred)</li>
<li>Anish P Patel (@anishpatelyaadada)</li>
</ul> </ul>
</td> </td>
<td> <td>

View File

@ -17,7 +17,7 @@ The following options are supported via the main options object passed to `useTa
- `initialState.sortBy: Array<Object<id: columnId, desc: Bool>>` - `initialState.sortBy: Array<Object<id: columnId, desc: Bool>>`
- Must be **memoized** - 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. - 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) - 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` - `disableSortBy: Bool`
- Disables sorting for every column in the entire table. - Disables sorting for every column in the entire table.

View File

@ -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, "timestamp": 1576020969676,
"files": [ "files": [

View File

@ -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, "timestamp": 1576020979047,
"files": [ "files": [

View File

@ -260,6 +260,18 @@ function isFunctionComponent(component) {
return typeof component === 'function' return typeof component === 'function'
} }
function isReactComponent(component) { function isExoticComponent(component) {
return isClassComponent(component) || isFunctionComponent(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)
)
} }