forked from grid-js/website
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: adding fixedHeader, height and ReactWrapper exampels
- Loading branch information
Showing
7 changed files
with
85 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
id: fixedHeader | ||
title: fixedHeader | ||
--- | ||
|
||
Fixes the header to the top of the table | ||
|
||
- `optional` | ||
- Default: `false` | ||
- Type: `boolean` | ||
- Example: [Fixed Header](../examples/fixed-header.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
id: height | ||
title: height | ||
--- | ||
|
||
To set the height of the table. | ||
|
||
- Default: `auto` | ||
- Type: `string` | ||
|
||
:::note | ||
`height` sets the height of the table excluding search, pagination, etc. | ||
::: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
--- | ||
id: fixed-header | ||
title: Fixed Header | ||
keywords: | ||
- javascript | ||
- table | ||
- javascript table | ||
- gridjs | ||
- grid js | ||
- fixed header | ||
--- | ||
|
||
import { LiveExample } from "../../lib/liveExample.js"; | ||
|
||
Simply add `height` and `fixedHeader` to your Grid.js config object to enable fixed header feature: | ||
|
||
<LiveExample children={ | ||
` | ||
const grid = new Grid({ | ||
columns: [ | ||
'Name', | ||
'Email', | ||
'Title', | ||
], | ||
sort: true, | ||
pagination: true, | ||
fixedHeader: true, | ||
height: '400px', | ||
data: Array(50).fill().map(x => [ | ||
faker.name.findName(), | ||
faker.internet.email(), | ||
faker.name.title(), | ||
]) | ||
}); | ||
` | ||
} /> | ||
|
||
<br/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters