diff --git a/docs/config/pagination.md b/docs/config/pagination.md index 48e16420..d92e7452 100644 --- a/docs/config/pagination.md +++ b/docs/config/pagination.md @@ -15,7 +15,6 @@ To enable the pagination plugin | Name | Description | Type | |------------------------------|-----------------------------------------------|---------------| -| enabled | to enable/disable pagination | boolean | | limit `optional` | rows per page | number | | page `optional` | initial page | number | | summary `optional` | to show/hide the pagination summary | boolean | @@ -36,7 +35,6 @@ new Grid({ ['Nisen', 'nis900@gmail.com', '313 333 1923'] ], pagination: { - enabled: true, limit: 2, summary: false } diff --git a/docs/config/search.md b/docs/config/search.md index f7830615..51051c50 100644 --- a/docs/config/search.md +++ b/docs/config/search.md @@ -15,7 +15,6 @@ To enable or disable the global search plugin | Name | Description | Type | Example | |----------------------------|--------------------------------|----------|---------------------| -| enabled | to enable/disable the plugin | boolean | `true` or `false` | | keyword `optional` | to initiate with a keyword | string | `John` | | server `optional` | to enable server integration | object | [Server-side search](../examples/server-side-search.md) | | debounceTimeout `optional` | search debounce timout | number | `1000` (1 second) | @@ -32,9 +31,7 @@ new Grid({ ['Eoin', 'eo3n@yahoo.com', '(05) 10 878 5554'], ['Nisen', 'nis900@gmail.com', '313 333 1923'] ], - search: { - enabled: true - } + search: true }); ``` diff --git a/docs/config/sort.md b/docs/config/sort.md index f95ca8d9..5f51734c 100644 --- a/docs/config/sort.md +++ b/docs/config/sort.md @@ -20,7 +20,6 @@ To enable the sorting plugin. Sort has two config objects: | Name | Description | Type | |-------------------------|-------------------------------------|---------------| -| enabled | to enable/disable sorting | boolean | | multiColumn `optional` | Enable/disable multi column sort | boolean | | server `optional` | Server-side integration | ServerConfig | @@ -69,7 +68,6 @@ new Grid({ | Name | Description | Type | |-------------------------|-------------------------------------|--------------------| -| enabled | to enable/disable sorting | boolean | | compare `optional` | custom comparator function | `Comparator`| @@ -83,9 +81,7 @@ new Grid({ 'Email', { name: 'Phone Number', - sort: { - enabled: false - } + sort: false } ], sort: true, diff --git a/docs/examples/custom-sort.md b/docs/examples/custom-sort.md index 82be9f2a..83508f59 100644 --- a/docs/examples/custom-sort.md +++ b/docs/examples/custom-sort.md @@ -51,3 +51,7 @@ const grid = new Grid({ }); ` } /> + +:::tip +In the example above, we are sorting the "Phone Number" column based on the _last 4 digits_! +::: diff --git a/docs/examples/server-side-pagination.md b/docs/examples/server-side-pagination.md index 0624290c..45ecf990 100644 --- a/docs/examples/server-side-pagination.md +++ b/docs/examples/server-side-pagination.md @@ -21,7 +21,6 @@ is correctly defined in the main `server` config block: const grid = new Grid({ columns: ['Pokemon', 'URL'], pagination: { - enabled: true, limit: 5, server: { url: (prev, page, limit) => \`\${prev}?limit=\${limit}&offset=\${page * limit}\` diff --git a/docs/integrations/react.md b/docs/integrations/react.md index 51e89287..6bdc8d67 100644 --- a/docs/integrations/react.md +++ b/docs/integrations/react.md @@ -33,7 +33,6 @@ import { Grid } from 'gridjs-react'; columns={['Name', 'Email']} search={true} pagination={{ - enabled: true, limit: 1, }} /> diff --git a/package-lock.json b/package-lock.json index dd9b9f03..ff40306e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,7 +16,7 @@ "chartist": "^0.11.4", "classnames": "^2.3.1", "faker": "^5.5.3", - "gridjs": "^6.0.4", + "gridjs": "^6.0.5", "gridjs-react": "^6.0.1", "postcss-scss": "^3.0.5", "react": "^17.0.2", @@ -7040,9 +7040,9 @@ } }, "node_modules/gridjs": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/gridjs/-/gridjs-6.0.4.tgz", - "integrity": "sha512-0dPw4NFtyrERMgLzpXSDh822GWmDtcgasaE5d4Wp9aDIJAdPEAt81Oq0NtqYKV/erj1aBEpdhRPmv34LRPBf0w==", + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/gridjs/-/gridjs-6.0.5.tgz", + "integrity": "sha512-dpGi1eK27tnplumOOrYOIQEJJaPZcx6kzexQTqtNN0CBKEVJBpFvbCJgk7xZyRMF42RoCT6BYRcQjzXCpQXbvQ==", "dependencies": { "preact": "^10.11.3" } diff --git a/package.json b/package.json index de6c01aa..a77b816d 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "chartist": "^0.11.4", "classnames": "^2.3.1", "faker": "^5.5.3", - "gridjs": "^6.0.4", + "gridjs": "^6.0.5", "gridjs-react": "^6.0.1", "postcss-scss": "^3.0.5", "react": "^17.0.2",