@pravinrd/awesome-grid 0.2.10 → 0.2.12
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 +23 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@ Awesome Grid is a feature-rich, themeable React data grid/table with client-side
|
|
|
10
10
|
- Theme switcher (light/dark/purple)
|
|
11
11
|
- Virtualized rendering for large datasets (All rows mode)
|
|
12
12
|
- Date filtering with HTML5 date input
|
|
13
|
-
- Personalization stored in
|
|
13
|
+
- Personalization stored in IndexedDB
|
|
14
14
|
|
|
15
15
|
## Install
|
|
16
16
|
```bash
|
|
@@ -26,6 +26,7 @@ export default function App() {
|
|
|
26
26
|
return (
|
|
27
27
|
<AwesomeGrid
|
|
28
28
|
apiEndpoint="/api/orders"
|
|
29
|
+
storageKey="orders-grid"
|
|
29
30
|
rowKey="id"
|
|
30
31
|
theme="light"
|
|
31
32
|
currency="USD"
|
|
@@ -162,5 +163,26 @@ The component expects a JSON response with `data` and `columns`.
|
|
|
162
163
|
import { AwesomeGrid } from "@pravinrd/awesome-grid";
|
|
163
164
|
```
|
|
164
165
|
|
|
166
|
+
## Styling
|
|
167
|
+
AwesomeGrid ships with a bundled stylesheet. Import it once in your app:
|
|
168
|
+
```js
|
|
169
|
+
import "@pravinrd/awesome-grid/style.css";
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
## Personalization Persistence (IndexedDB)
|
|
173
|
+
AwesomeGrid stores personalization in IndexedDB (not LocalStorage) so settings survive refreshes:
|
|
174
|
+
- Theme
|
|
175
|
+
- Column order + visibility
|
|
176
|
+
- Grouping selections
|
|
177
|
+
- Aggregate columns
|
|
178
|
+
- Column widths
|
|
179
|
+
|
|
180
|
+
Use a unique `storageKey` per grid instance if you render multiple grids on the same page:
|
|
181
|
+
```jsx
|
|
182
|
+
<AwesomeGrid apiEndpoint="/api/orders" rowKey="id" storageKey="orders-grid" />
|
|
183
|
+
<AwesomeGrid apiEndpoint="/api/customers" rowKey="id" storageKey="customers-grid" />
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
|
|
165
187
|
## License
|
|
166
188
|
MIT
|