@toolbox-web/grid 2.0.0 → 2.1.0
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/all.js +1 -1
- package/all.js.map +1 -1
- package/index.js +1 -1
- package/lib/plugins/server-side/ServerSidePlugin.d.ts +15 -15
- package/lib/plugins/server-side/index.js +1 -1
- package/lib/plugins/server-side/index.js.map +1 -1
- package/lib/plugins/server-side/types.d.ts +20 -0
- package/package.json +1 -1
- package/umd/grid.all.umd.js +1 -1
- package/umd/grid.all.umd.js.map +1 -1
- package/umd/plugins/server-side.umd.js +1 -1
- package/umd/plugins/server-side.umd.js.map +1 -1
|
@@ -38,6 +38,26 @@ export interface ServerSideConfig {
|
|
|
38
38
|
* @default 2
|
|
39
39
|
*/
|
|
40
40
|
maxConcurrentRequests?: number;
|
|
41
|
+
/**
|
|
42
|
+
* Data source for server-side loading.
|
|
43
|
+
* When provided, the plugin auto-initializes on attach — no need to call `setDataSource()`.
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* ```typescript
|
|
47
|
+
* features: {
|
|
48
|
+
* serverSide: {
|
|
49
|
+
* pageSize: 50,
|
|
50
|
+
* dataSource: {
|
|
51
|
+
* async getRows(params) {
|
|
52
|
+
* const res = await fetch(`/api/data?start=${params.startNode}&end=${params.endNode}`);
|
|
53
|
+
* return res.json();
|
|
54
|
+
* },
|
|
55
|
+
* },
|
|
56
|
+
* },
|
|
57
|
+
* }
|
|
58
|
+
* ```
|
|
59
|
+
*/
|
|
60
|
+
dataSource?: ServerSideDataSource;
|
|
41
61
|
}
|
|
42
62
|
export interface ServerSideState {
|
|
43
63
|
dataSource: ServerSideDataSource | null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@toolbox-web/grid",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"description": "Zero-dependency, framework-agnostic data grid web component with virtualization, sorting, filtering, editing, and 20+ plugins. Works in vanilla JS, React, Vue, Angular, and any framework.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./index.js",
|