@gridstorm/react 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +47 -0
- package/dist/index.cjs +1079 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +405 -0
- package/dist/index.d.ts +405 -0
- package/dist/index.js +1062 -0
- package/dist/index.js.map +1 -0
- package/package.json +81 -0
package/README.md
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# @gridstorm/react
|
|
2
|
+
|
|
3
|
+
React 18+ adapter for GridStorm with hooks, error boundaries, and portal-based overlays.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @gridstorm/react @gridstorm/core @gridstorm/dom-renderer
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```tsx
|
|
14
|
+
import { GridStorm } from '@gridstorm/react';
|
|
15
|
+
import { SortingPlugin } from '@gridstorm/plugin-sorting';
|
|
16
|
+
|
|
17
|
+
const columns = [
|
|
18
|
+
{ field: 'name', headerName: 'Name' },
|
|
19
|
+
{ field: 'age', headerName: 'Age' },
|
|
20
|
+
];
|
|
21
|
+
|
|
22
|
+
export default function App() {
|
|
23
|
+
return (
|
|
24
|
+
<GridStorm
|
|
25
|
+
rowData={[{ id: 1, name: 'Alice', age: 32 }]}
|
|
26
|
+
columnDefs={columns}
|
|
27
|
+
plugins={[SortingPlugin()]}
|
|
28
|
+
height={400}
|
|
29
|
+
/>
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Features
|
|
35
|
+
|
|
36
|
+
- `<GridStorm>` component with declarative props
|
|
37
|
+
- React hooks for grid state access
|
|
38
|
+
- Error boundary for graceful error handling
|
|
39
|
+
- Portal-based overlays for editors and menus
|
|
40
|
+
|
|
41
|
+
## Documentation
|
|
42
|
+
|
|
43
|
+
[Full API Reference](https://grid-data-analytics-explorer.vercel.app//api/react) | [React Guide](https://grid-data-analytics-explorer.vercel.app//docs/react)
|
|
44
|
+
|
|
45
|
+
## License
|
|
46
|
+
|
|
47
|
+
MIT
|