-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #85 from mckervinc/feature/frozen
add ability to freeze columns
- Loading branch information
Showing
15 changed files
with
194 additions
and
41 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 |
---|---|---|
@@ -1,5 +1,7 @@ | ||
{ | ||
"printWidth": 100, | ||
"arrowParens": "avoid", | ||
"trailingComma": "none" | ||
"printWidth": 100, | ||
"arrowParens": "avoid", | ||
"trailingComma": "none", | ||
"tabWidth": 2, | ||
"semi": true | ||
} |
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import { ColumnProps, Table } from "react-fluid-table"; | ||
import { TestData, testData } from "../data"; | ||
|
||
const columns: ColumnProps<TestData>[] = [ | ||
{ | ||
key: "id", | ||
header: "ID", | ||
width: 50, | ||
frozen: true | ||
}, | ||
{ | ||
key: "firstName", | ||
header: "First", | ||
width: 120, | ||
frozen: true | ||
}, | ||
{ | ||
key: "lastName", | ||
header: "Last", | ||
width: 120 | ||
}, | ||
{ | ||
key: "email", | ||
header: "Email", | ||
width: 250 | ||
} | ||
]; | ||
|
||
const Example12 = () => <Table data={testData} columns={columns} tableWidth={400} />; | ||
|
||
const Source = ` | ||
const data = [/* ... */]; | ||
const columns: ColumnProps<TestData>[] = [ | ||
{ key: "id", header: "ID", width: 50, frozen: true }, | ||
{ key: "firstName", header: "First", width: 120, frozen: true }, | ||
{ key: "lastName", header: "Last", width: 120 }, | ||
{ key: "email", header: "Email", width: 250 } | ||
]; | ||
const Example = () => <Table data={data} columns={columns} tableWidth={400} />; | ||
`; | ||
|
||
export { Example12, Source }; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "react-fluid-table", | ||
"version": "0.5.0", | ||
"version": "0.5.1", | ||
"description": "A React table inspired by react-window", | ||
"author": "Mckervin Ceme <[email protected]>", | ||
"license": "MIT", | ||
|
@@ -25,6 +25,7 @@ | |
"npm": ">=5" | ||
}, | ||
"scripts": { | ||
"clean": "rm -rf dist", | ||
"build": "rm -rf dist ||: && rollup -c --environment BUILD:production", | ||
"start": "rollup -c -w --environment BUILD:development", | ||
"site:build": "cd example && yarn install && yarn build" | ||
|
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
Oops, something went wrong.