diff --git a/.size-snapshot.json b/.size-snapshot.json index 4493b6c..01d9ccb 100644 --- a/.size-snapshot.json +++ b/.size-snapshot.json @@ -1,5 +1,13 @@ { "dist/index.js": { + "bundled": 113198, + "minified": 52513, + "gzipped": 13835 + }, + "dist/index.es.js": { + "bundled": 112261, + "minified": 51677, + "gzipped": 13669, "bundled": 126701, "minified": 59700, "gzipped": 15373 diff --git a/docs/api/useSortBy.md b/docs/api/useSortBy.md index 6fecac7..77ade46 100644 --- a/docs/api/useSortBy.md +++ b/docs/api/useSortBy.md @@ -72,7 +72,7 @@ The following options are supported on any `Column` object passed to the `column - Defaults to `false` - If set to `true`, the underlying sorting direction will be inverted, but the UI will not. - This may be useful in situations where positive and negative connotation is inverted, eg. a Golfing score where a lower score is considered more positive than a higher one. -- `sortType: String | Function(rowA: , rowB: , columnID: String, desc: Bool)` +- `sortType: String | Function(rowA: , rowB: , columnId: String, desc: Bool)` - Used to compare 2 rows of data and order them correctly. - If a **function** is passed, it must be **memoized** - String options: `basic`, `datetime`, `alphanumeric`. Defaults to `alphanumeric`. @@ -106,7 +106,7 @@ The following properties are available on every `Column` object returned by the - This function is used to resolve any props needed for this column's UI that is responsible for toggling the sort direction when the user clicks it. - You can use the `getSortByToggleProps` hook to extend its functionality. - Custom props may be passed. **NOTE: Custom props may override built-in sortBy props, so be careful!** -- `clearSorting: Function() => void` +- `clearSortBy: Function() => void` - This function can be used to programmatically clear the sorting for this column. - `isSorted: Boolean` - Denotes whether this column is currently being sorted diff --git a/examples/editable-data/src/App.js b/examples/editable-data/src/App.js index 0684e71..5495765 100644 --- a/examples/editable-data/src/App.js +++ b/examples/editable-data/src/App.js @@ -63,7 +63,7 @@ const EditableCell = ({ updateMyData(index, id, value) } - // If the initialValue is changed externall, sync it up with our state + // If the initialValue is changed external, sync it up with our state React.useEffect(() => { setValue(initialValue) }, [initialValue]) diff --git a/sizes-cjs.json b/sizes-cjs.json index 7d5ba74..b0ec55a 100644 --- a/sizes-cjs.json +++ b/sizes-cjs.json @@ -1,10 +1,10 @@ [ { - "timestamp": 1578686270736, + "timestamp": 1581710431975, "files": [ { "filename": "index.js", - "size": 23119, + "size": 25790, "delta": -3 } ] diff --git a/sizes-es.json b/sizes-es.json index f25218c..1ab8ade 100644 --- a/sizes-es.json +++ b/sizes-es.json @@ -1,11 +1,11 @@ [ { - "timestamp": 1578686279477, + "timestamp": 1581710438411, "files": [ { "filename": "index.es.js", - "size": 22915, - "delta": -2 + "size": 25587, + "delta": -4 } ] } diff --git a/src/plugin-hooks/useGroupBy.js b/src/plugin-hooks/useGroupBy.js index ea88f29..958bd0c 100755 --- a/src/plugin-hooks/useGroupBy.js +++ b/src/plugin-hooks/useGroupBy.js @@ -128,7 +128,6 @@ function useInstance(instance) { state: { groupBy }, dispatch, autoResetGroupBy = true, - manaulGroupBy, disableGroupBy, defaultCanGroupBy, getHooks, @@ -320,7 +319,7 @@ function useInstance(instance) { if (getAutoResetGroupBy()) { dispatch({ type: actions.resetGroupBy }) } - }, [dispatch, manaulGroupBy ? null : data]) + }, [dispatch, manualGroupBy ? null : data]) Object.assign(instance, { preGroupedRows: rows,