UNPKG

4.83 kBMarkdownView Raw
1
2![alt text](./github-banner.png "AG Grid")
3
4[![CDNJS](https://img.shields.io/cdnjs/v/ag-grid)](https://cdnjs.com/libraries/ag-grid) [![npm](https://img.shields.io/npm/dm/ag-grid-react)](https://www.npmjs.com/package/ag-grid-react) [![Bundle Phobia](https://badgen.net/bundlephobia/minzip/ag-grid-react)](https://bundlephobia.com/result?p=ag-grid-react) [![Github Stars](https://img.shields.io/github/stars/ag-grid/ag-grid?style=social)](https://github.com/ag-grid/ag-grid) [![Twitter](https://img.shields.io/twitter/follow/ag_grid?style=social)](https://twitter.com/ag_grid)
5
6AG Grid React Component
7------
8
9AG Grid is a fully-featured and highly customizable JavaScript data grid.
10It delivers [outstanding performance](https://www.ag-grid.com/example.php?utm_source=ag-grid-react-readme&utm_medium=repository&utm_campaign=github#/performance/1), has no 3rd party dependencies and integrates smoothly with React as React Component. Here's how our grid looks like with multiple filters and grouping enabled:
11
12![alt text](./github-grid-demo.jpg "AG Grid")
13
14
15Features
16--------------
17
18Besides the standard set of features you'd expect from any grid:
19
20* Column Interactions (resize, reorder, and pin columns)
21* Pagination
22* Sorting
23* Row Selection
24
25Here are some of the features that make AG Grid stand out:
26
27* Grouping / Aggregation*
28* Custom Filtering
29* In-place Cell Editing
30* Records Lazy Loading *
31* Server-Side Records Operations *
32* Live Stream Updates
33* Hierarchical Data Support & Tree View *
34* Customizable Appearance
35* Customizable Cell Contents
36* Excel-like Pivoting *
37* State Persistence
38* Keyboard navigation
39* Data Export to CSV
40* Data Export to Excel *
41* Row Reordering
42* Copy / Paste
43* Column Spanning
44* Pinned Rows
45* Full Width Rows
46
47\* The features marked with an asterisk are available in the [enterprise version](https://www.ag-grid.com/license-pricing.php?utm_source=ag-grid-react-readme&utm_medium=repository&utm_campaign=github) only.
48
49Check out [developers documentation](https://www.ag-grid.com/documentation-main/documentation.php?utm_source=ag-grid-react-readme&utm_medium=repository&utm_campaign=github) for a complete list of features or visit [our official docs](https://www.ag-grid.com/features-overview?utm_source=ag-grid-react-readme&utm_medium=repository&utm_campaign=github) for tutorials and feature demos.
50
51Usage Overview
52--------------
53
54Use the setup instructions below or go through [a 5-minute-quickstart guide](https://www.ag-grid.com/react-grid?utm_source=ag-grid-react-readme&utm_medium=repository&utm_campaign=github).
55
56#### Install dependencies
57
58 $ npm i --save ag-grid-community ag-grid-react react-dom-factories
59
60#### Import the grid and styles
61
62 import {AgGridReact} from 'ag-grid-react';
63
64 import 'ag-grid-community/dist/styles/ag-grid.css';
65 import 'ag-grid-community/dist/styles/ag-theme-balham.css';
66
67### Set the grid's configuration in a parent component
68 class App extends Component {
69 constructor(props) {
70 super(props);
71
72 this.state = {
73 columnDefs: [
74 {headerName: "Make", field: "make"},
75 {headerName: "Model", field: "model"},
76 {headerName: "Price", field: "price"}
77
78 ],
79 rowData: [
80 {make: "Toyota", model: "Celica", price: 35000},
81 {make: "Ford", model: "Mondeo", price: 32000},
82 {make: "Porsche", model: "Boxter", price: 72000}
83 ]
84 }
85 }
86 ...
87 }
88
89### Render the grid as the `AgGridReact` child component
90
91 class App extends Component {
92 constructor(props) {...}
93
94 render() {
95 return (
96 <div
97 className="ag-theme-balham"
98 style={{
99 height: '500px',
100 width: '600px'
101 }}
102 >
103 <AgGridReact
104 columnDefs={this.state.columnDefs}
105 rowData={this.state.rowData}>
106 </AgGridReact>
107 </div>
108 );
109 }
110 }
111
112Issue Reporting
113----------
114If you have found a bug, please report them at this repository `issues` section. If you're using Enterprise version please use the private ticketing system to do that. For more information on support check out our [dedicated page](https://www.ag-grid.com/support.php?utm_source=ag-grid-react-readme&utm_medium=repository&utm_campaign=github).
115
116
117Asking Questions
118-------------
119
120Look for similar problems on [StackOverflow](https://stackoverflow.com/questions/tagged/ag-grid) using the `ag-grid` tag. If nothing seems related, post a new message there. Do not use GitHub issues to ask questions.
121
122Contributing
123------------
124AG Grid is developed by a team of co-located developers in London. If you want to join the team check out our [jobs listing](https://www.ag-grid.com/ag-grid-jobs-board?utm_source=ag-grid-react-readme&utm_medium=repository&utm_campaign=github) or send your application to info@ag-grid.com.
125
126License
127------------------
128This project is licensed under the MIT license. See the [LICENSE file](./LICENSE.txt) for more info.