Skip to content

Commit

Permalink
fix: v6 docs update
Browse files Browse the repository at this point in the history
  • Loading branch information
afshinm committed Jan 19, 2023
1 parent e9e7b69 commit 2b37f49
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 18 deletions.
2 changes: 0 additions & 2 deletions docs/config/pagination.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand All @@ -36,7 +35,6 @@ new Grid({
['Nisen', '[email protected]', '313 333 1923']
],
pagination: {
enabled: true,
limit: 2,
summary: false
}
Expand Down
5 changes: 1 addition & 4 deletions docs/config/search.md
Original file line number Diff line number Diff line change
Expand Up @@ -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) |
Expand All @@ -32,9 +31,7 @@ new Grid({
['Eoin', '[email protected]', '(05) 10 878 5554'],
['Nisen', '[email protected]', '313 333 1923']
],
search: {
enabled: true
}
search: true
});
```

Expand Down
6 changes: 1 addition & 5 deletions docs/config/sort.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |

Expand Down Expand Up @@ -69,7 +68,6 @@ new Grid({

| Name | Description | Type |
|-------------------------|-------------------------------------|--------------------|
| enabled | to enable/disable sorting | boolean |
| compare `optional` | custom comparator function | `Comparator<TCell>`|

</div>
Expand All @@ -83,9 +81,7 @@ new Grid({
'Email',
{
name: 'Phone Number',
sort: {
enabled: false
}
sort: false
}
],
sort: true,
Expand Down
4 changes: 4 additions & 0 deletions docs/examples/custom-sort.md
Original file line number Diff line number Diff line change
Expand Up @@ -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_!
:::
1 change: 0 additions & 1 deletion docs/examples/server-side-pagination.md
Original file line number Diff line number Diff line change
Expand Up @@ -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}\`
Expand Down
1 change: 0 additions & 1 deletion docs/integrations/react.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ import { Grid } from 'gridjs-react';
columns={['Name', 'Email']}
search={true}
pagination={{
enabled: true,
limit: 1,
}}
/>
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

1 comment on commit 2b37f49

@vercel
Copy link

@vercel vercel bot commented on 2b37f49 Jan 19, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.