@alaarab/ogrid-mcp 2.9.0 → 2.11.1
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/bundled-docs/api/README.md +7 -32
- package/bundled-docs/api/column-def.mdx +1 -1
- package/bundled-docs/api/components-column-chooser.mdx +0 -96
- package/bundled-docs/api/components-column-header-filter.mdx +1 -83
- package/bundled-docs/api/components-datagrid-table.mdx +0 -63
- package/bundled-docs/api/components-pagination-controls.mdx +0 -94
- package/bundled-docs/api/components-sidebar.mdx +0 -76
- package/bundled-docs/api/components-status-bar.mdx +0 -66
- package/bundled-docs/api/headless-hooks.mdx +410 -0
- package/bundled-docs/api/ogrid-props.mdx +1 -1
- package/bundled-docs/api/types.mdx +1 -1
- package/bundled-docs/features/cell-references.mdx +2 -116
- package/bundled-docs/features/column-chooser.mdx +0 -131
- package/bundled-docs/features/column-groups.mdx +1 -136
- package/bundled-docs/features/column-pinning.mdx +1 -108
- package/bundled-docs/features/column-reordering.mdx +1 -168
- package/bundled-docs/features/column-types.mdx +0 -71
- package/bundled-docs/features/context-menu.mdx +1 -93
- package/bundled-docs/features/csv-export.mdx +1 -104
- package/bundled-docs/features/editing.mdx +0 -149
- package/bundled-docs/features/filtering.mdx +0 -119
- package/bundled-docs/features/formulas.mdx +2 -102
- package/bundled-docs/features/grid-api.mdx +1 -108
- package/bundled-docs/features/keyboard-navigation.mdx +1 -74
- package/bundled-docs/features/mobile-touch.mdx +0 -71
- package/bundled-docs/features/pagination.mdx +0 -105
- package/bundled-docs/features/performance.mdx +0 -191
- package/bundled-docs/features/premium-inputs.mdx +0 -311
- package/bundled-docs/features/responsive-columns.mdx +1 -76
- package/bundled-docs/features/row-selection.mdx +2 -106
- package/bundled-docs/features/server-side-data.mdx +1 -129
- package/bundled-docs/features/sidebar.mdx +1 -78
- package/bundled-docs/features/sorting.mdx +2 -108
- package/bundled-docs/features/spreadsheet-selection.mdx +2 -79
- package/bundled-docs/features/status-bar.mdx +1 -72
- package/bundled-docs/features/toolbar.mdx +1 -75
- package/bundled-docs/features/virtual-scrolling.mdx +1 -304
- package/bundled-docs/getting-started/headless-or-component.mdx +112 -0
- package/bundled-docs/getting-started/installation.mdx +11 -141
- package/bundled-docs/getting-started/overview.mdx +15 -55
- package/bundled-docs/getting-started/quick-start.mdx +4 -279
- package/bundled-docs/guides/browser-support-matrix.mdx +6 -17
- package/bundled-docs/guides/mcp-live-testing.mdx +0 -82
- package/bundled-docs/guides/mcp.mdx +4 -4
- package/bundled-docs/guides/migration-from-ag-grid.mdx +2 -3
- package/bundled-docs/guides/theming.mdx +50 -23
- package/dist/esm/index.js +9 -39
- package/package.json +5 -5
- package/bundled-docs/api/js-api.mdx +0 -198
- package/bundled-docs/getting-started/vanilla-js.mdx +0 -218
- package/bundled-docs/guides/framework-showcase.mdx +0 -246
|
@@ -14,7 +14,7 @@ OGrid supports comprehensive keyboard navigation for moving between cells, editi
|
|
|
14
14
|
<KeyboardNavigationDemo />
|
|
15
15
|
|
|
16
16
|
:::tip Try it in your framework
|
|
17
|
-
The demo above uses Radix UI for styling. To see this feature with
|
|
17
|
+
The demo above uses Radix UI for styling. To see this feature with the Fluent UI implementation, click **"Open in online demo"** below the demo.
|
|
18
18
|
:::
|
|
19
19
|
|
|
20
20
|
## Quick Example
|
|
@@ -41,81 +41,8 @@ The `OGrid` component has the same props across all React UI packages. To switch
|
|
|
41
41
|
|
|
42
42
|
- **Radix** (lightweight, default): `from '@alaarab/ogrid-react-radix'`
|
|
43
43
|
- **Fluent UI** (Microsoft 365 / SPFx): `from '@alaarab/ogrid-react-fluent'` - wrap in `<FluentProvider>`
|
|
44
|
-
- **Material UI** (MUI v7): `from '@alaarab/ogrid-react-material'` - wrap in `<ThemeProvider>`
|
|
45
44
|
:::
|
|
46
45
|
|
|
47
|
-
</TabItem>
|
|
48
|
-
<TabItem value="angular" label="Angular">
|
|
49
|
-
|
|
50
|
-
```typescript
|
|
51
|
-
|
|
52
|
-
@Component({
|
|
53
|
-
standalone: true,
|
|
54
|
-
imports: [OGridComponent],
|
|
55
|
-
template: `<ogrid [props]="gridProps" />`
|
|
56
|
-
})
|
|
57
|
-
export class GridComponent {
|
|
58
|
-
gridProps = {
|
|
59
|
-
columns: columns,
|
|
60
|
-
data: data,
|
|
61
|
-
getRowId: (r: Row) => r.id,
|
|
62
|
-
editable: true,
|
|
63
|
-
};
|
|
64
|
-
}
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
:::tip Switching UI libraries
|
|
68
|
-
Same component API across Angular packages. To switch, just change the import:
|
|
69
|
-
|
|
70
|
-
- **Radix (CDK)**: `from '@alaarab/ogrid-angular-radix'` *(default, lightweight)*
|
|
71
|
-
- **Angular Material**: `from '@alaarab/ogrid-angular-material'`
|
|
72
|
-
- **PrimeNG**: `from '@alaarab/ogrid-angular-primeng'`
|
|
73
|
-
|
|
74
|
-
All components are standalone - no NgModule required.
|
|
75
|
-
:::
|
|
76
|
-
|
|
77
|
-
</TabItem>
|
|
78
|
-
<TabItem value="vue" label="Vue">
|
|
79
|
-
|
|
80
|
-
```vue
|
|
81
|
-
<script setup lang="ts">
|
|
82
|
-
|
|
83
|
-
const gridProps = {
|
|
84
|
-
columns,
|
|
85
|
-
data,
|
|
86
|
-
getRowId: (r) => r.id,
|
|
87
|
-
editable: true,
|
|
88
|
-
};
|
|
89
|
-
</script>
|
|
90
|
-
|
|
91
|
-
<template>
|
|
92
|
-
<OGrid :gridProps="gridProps" />
|
|
93
|
-
</template>
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
:::tip Switching UI libraries
|
|
97
|
-
Same component API across Vue packages. To switch, just change the import:
|
|
98
|
-
|
|
99
|
-
- **Radix (Headless UI)**: `from '@alaarab/ogrid-vue-radix'` *(default, lightweight)*
|
|
100
|
-
- **Vuetify**: `from '@alaarab/ogrid-vue-vuetify'` - wrap in `<v-app>` for theming
|
|
101
|
-
- **PrimeVue**: `from '@alaarab/ogrid-vue-primevue'`
|
|
102
|
-
:::
|
|
103
|
-
|
|
104
|
-
</TabItem>
|
|
105
|
-
<TabItem value="js" label="Vanilla JS">
|
|
106
|
-
|
|
107
|
-
```js
|
|
108
|
-
|
|
109
|
-
const grid = new OGrid(document.getElementById('grid'), {
|
|
110
|
-
columns: columns,
|
|
111
|
-
data: data,
|
|
112
|
-
getRowId: (r) => r.id,
|
|
113
|
-
editable: true,
|
|
114
|
-
});
|
|
115
|
-
|
|
116
|
-
// Click any cell to make it active, then use keyboard to navigate
|
|
117
|
-
```
|
|
118
|
-
|
|
119
46
|
</TabItem>
|
|
120
47
|
</Tabs>
|
|
121
48
|
|
|
@@ -63,79 +63,8 @@ The `OGrid` component has the same props across all React UI packages. To switch
|
|
|
63
63
|
|
|
64
64
|
- **Radix** (lightweight, default): `from '@alaarab/ogrid-react-radix'`
|
|
65
65
|
- **Fluent UI** (Microsoft 365 / SPFx): `from '@alaarab/ogrid-react-fluent'` - wrap in `<FluentProvider>`
|
|
66
|
-
- **Material UI** (MUI v7): `from '@alaarab/ogrid-react-material'` - wrap in `<ThemeProvider>`
|
|
67
66
|
:::
|
|
68
67
|
|
|
69
|
-
</TabItem>
|
|
70
|
-
<TabItem value="angular" label="Angular">
|
|
71
|
-
|
|
72
|
-
```typescript
|
|
73
|
-
|
|
74
|
-
@Component({
|
|
75
|
-
standalone: true,
|
|
76
|
-
imports: [OGridComponent],
|
|
77
|
-
template: `<ogrid [props]="gridProps" />`
|
|
78
|
-
})
|
|
79
|
-
export class GridComponent {
|
|
80
|
-
gridProps = {
|
|
81
|
-
columns,
|
|
82
|
-
data: items,
|
|
83
|
-
getRowId: (item: any) => item.id,
|
|
84
|
-
cellSelection: true,
|
|
85
|
-
};
|
|
86
|
-
}
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
:::tip Switching UI libraries
|
|
90
|
-
Same component API across Angular packages. To switch, just change the import:
|
|
91
|
-
|
|
92
|
-
- **Radix (CDK)**: `from '@alaarab/ogrid-angular-radix'` *(default, lightweight)*
|
|
93
|
-
- **Angular Material**: `from '@alaarab/ogrid-angular-material'`
|
|
94
|
-
- **PrimeNG**: `from '@alaarab/ogrid-angular-primeng'`
|
|
95
|
-
|
|
96
|
-
All components are standalone - no NgModule required.
|
|
97
|
-
:::
|
|
98
|
-
|
|
99
|
-
</TabItem>
|
|
100
|
-
<TabItem value="vue" label="Vue">
|
|
101
|
-
|
|
102
|
-
```vue
|
|
103
|
-
<script setup lang="ts">
|
|
104
|
-
|
|
105
|
-
const gridProps = {
|
|
106
|
-
columns,
|
|
107
|
-
data: items,
|
|
108
|
-
getRowId: (item) => item.id,
|
|
109
|
-
cellSelection: true,
|
|
110
|
-
};
|
|
111
|
-
</script>
|
|
112
|
-
|
|
113
|
-
<template>
|
|
114
|
-
<OGrid :gridProps="gridProps" />
|
|
115
|
-
</template>
|
|
116
|
-
```
|
|
117
|
-
|
|
118
|
-
:::tip Switching UI libraries
|
|
119
|
-
Same component API across Vue packages. To switch, just change the import:
|
|
120
|
-
|
|
121
|
-
- **Radix (Headless UI)**: `from '@alaarab/ogrid-vue-radix'` *(default, lightweight)*
|
|
122
|
-
- **Vuetify**: `from '@alaarab/ogrid-vue-vuetify'` - wrap in `<v-app>` for theming
|
|
123
|
-
- **PrimeVue**: `from '@alaarab/ogrid-vue-primevue'`
|
|
124
|
-
:::
|
|
125
|
-
|
|
126
|
-
</TabItem>
|
|
127
|
-
<TabItem value="js" label="Vanilla JS">
|
|
128
|
-
|
|
129
|
-
```js
|
|
130
|
-
|
|
131
|
-
const grid = new OGrid(document.getElementById('grid'), {
|
|
132
|
-
columns: columns,
|
|
133
|
-
data: items,
|
|
134
|
-
getRowId: (item) => item.id,
|
|
135
|
-
cellSelection: true,
|
|
136
|
-
});
|
|
137
|
-
```
|
|
138
|
-
|
|
139
68
|
</TabItem>
|
|
140
69
|
</Tabs>
|
|
141
70
|
|
|
@@ -55,113 +55,8 @@ The `OGrid` component has the same props across all React UI packages. To switch
|
|
|
55
55
|
|
|
56
56
|
- **Radix** (lightweight, default): `from '@alaarab/ogrid-react-radix'`
|
|
57
57
|
- **Fluent UI** (Microsoft 365 / SPFx): `from '@alaarab/ogrid-react-fluent'` - wrap in `<FluentProvider>`
|
|
58
|
-
- **Material UI** (MUI v7): `from '@alaarab/ogrid-react-material'` - wrap in `<ThemeProvider>`
|
|
59
58
|
:::
|
|
60
59
|
|
|
61
|
-
</TabItem>
|
|
62
|
-
<TabItem value="angular" label="Angular">
|
|
63
|
-
|
|
64
|
-
```typescript
|
|
65
|
-
|
|
66
|
-
@Component({
|
|
67
|
-
standalone: true,
|
|
68
|
-
imports: [OGridComponent],
|
|
69
|
-
template: `<ogrid [props]="gridProps" />`
|
|
70
|
-
})
|
|
71
|
-
export class GridComponent {
|
|
72
|
-
gridProps = {
|
|
73
|
-
columns: [
|
|
74
|
-
{ columnId: 'name', name: 'Name' },
|
|
75
|
-
{ columnId: 'email', name: 'Email' },
|
|
76
|
-
{ columnId: 'department', name: 'Department' },
|
|
77
|
-
{
|
|
78
|
-
columnId: 'salary', name: 'Salary', type: 'numeric',
|
|
79
|
-
valueFormatter: (v: unknown) => `$${Number(v).toLocaleString()}`,
|
|
80
|
-
},
|
|
81
|
-
] as IColumnDef<Person>[],
|
|
82
|
-
data: people,
|
|
83
|
-
getRowId: (item: Person) => item.id,
|
|
84
|
-
defaultPageSize: 5,
|
|
85
|
-
pageSizeOptions: [5, 10, 25, 50],
|
|
86
|
-
entityLabelPlural: 'people',
|
|
87
|
-
};
|
|
88
|
-
}
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
:::tip Switching UI libraries
|
|
92
|
-
Same component API across Angular packages. To switch, just change the import:
|
|
93
|
-
|
|
94
|
-
- **Radix (CDK)**: `from '@alaarab/ogrid-angular-radix'` *(default, lightweight)*
|
|
95
|
-
- **Angular Material**: `from '@alaarab/ogrid-angular-material'`
|
|
96
|
-
- **PrimeNG**: `from '@alaarab/ogrid-angular-primeng'`
|
|
97
|
-
|
|
98
|
-
All components are standalone - no NgModule required.
|
|
99
|
-
:::
|
|
100
|
-
|
|
101
|
-
</TabItem>
|
|
102
|
-
<TabItem value="vue" label="Vue">
|
|
103
|
-
|
|
104
|
-
```vue
|
|
105
|
-
<script setup lang="ts">
|
|
106
|
-
|
|
107
|
-
const columns: IColumnDef<Person>[] = [
|
|
108
|
-
{ columnId: 'name', name: 'Name' },
|
|
109
|
-
{ columnId: 'email', name: 'Email' },
|
|
110
|
-
{ columnId: 'department', name: 'Department' },
|
|
111
|
-
{
|
|
112
|
-
columnId: 'salary', name: 'Salary', type: 'numeric',
|
|
113
|
-
valueFormatter: (v) => `$${Number(v).toLocaleString()}`,
|
|
114
|
-
},
|
|
115
|
-
];
|
|
116
|
-
|
|
117
|
-
const gridProps = {
|
|
118
|
-
columns,
|
|
119
|
-
data: people,
|
|
120
|
-
getRowId: (item) => item.id,
|
|
121
|
-
defaultPageSize: 5,
|
|
122
|
-
pageSizeOptions: [5, 10, 25, 50],
|
|
123
|
-
entityLabelPlural: 'people',
|
|
124
|
-
};
|
|
125
|
-
</script>
|
|
126
|
-
|
|
127
|
-
<template>
|
|
128
|
-
<OGrid :gridProps="gridProps" />
|
|
129
|
-
</template>
|
|
130
|
-
```
|
|
131
|
-
|
|
132
|
-
:::tip Switching UI libraries
|
|
133
|
-
Same component API across Vue packages. To switch, just change the import:
|
|
134
|
-
|
|
135
|
-
- **Radix (Headless UI)**: `from '@alaarab/ogrid-vue-radix'` *(default, lightweight)*
|
|
136
|
-
- **Vuetify**: `from '@alaarab/ogrid-vue-vuetify'` - wrap in `<v-app>` for theming
|
|
137
|
-
- **PrimeVue**: `from '@alaarab/ogrid-vue-primevue'`
|
|
138
|
-
:::
|
|
139
|
-
|
|
140
|
-
</TabItem>
|
|
141
|
-
<TabItem value="js" label="Vanilla JS">
|
|
142
|
-
|
|
143
|
-
```js
|
|
144
|
-
|
|
145
|
-
const grid = new OGrid(document.getElementById('grid'), {
|
|
146
|
-
columns: [
|
|
147
|
-
{ columnId: 'name', name: 'Name' },
|
|
148
|
-
{ columnId: 'email', name: 'Email' },
|
|
149
|
-
{ columnId: 'department', name: 'Department' },
|
|
150
|
-
{
|
|
151
|
-
columnId: 'salary',
|
|
152
|
-
name: 'Salary',
|
|
153
|
-
type: 'numeric',
|
|
154
|
-
valueFormatter: (v) => `$${Number(v).toLocaleString()}`,
|
|
155
|
-
},
|
|
156
|
-
],
|
|
157
|
-
data: people,
|
|
158
|
-
getRowId: (item) => item.id,
|
|
159
|
-
pageSize: 5,
|
|
160
|
-
pageSizeOptions: [5, 10, 25, 50],
|
|
161
|
-
entityLabelPlural: 'people',
|
|
162
|
-
});
|
|
163
|
-
```
|
|
164
|
-
|
|
165
60
|
</TabItem>
|
|
166
61
|
</Tabs>
|
|
167
62
|
|
|
@@ -102,113 +102,8 @@ Same props across all React packages — just change the import:
|
|
|
102
102
|
|
|
103
103
|
- **Radix** (lightweight, default): `from '@alaarab/ogrid-react-radix'`
|
|
104
104
|
- **Fluent UI** (Microsoft 365 / SPFx): `from '@alaarab/ogrid-react-fluent'` - wrap in `<FluentProvider>`
|
|
105
|
-
- **Material UI** (MUI v7): `from '@alaarab/ogrid-react-material'` - wrap in `<ThemeProvider>`
|
|
106
105
|
:::
|
|
107
106
|
|
|
108
|
-
</TabItem>
|
|
109
|
-
<TabItem value="angular" label="Angular">
|
|
110
|
-
|
|
111
|
-
```typescript
|
|
112
|
-
|
|
113
|
-
interface Row {
|
|
114
|
-
id: number;
|
|
115
|
-
name: string;
|
|
116
|
-
revenue: number;
|
|
117
|
-
region: string;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
@Component({
|
|
121
|
-
standalone: true,
|
|
122
|
-
imports: [OGridComponent],
|
|
123
|
-
template: `<ogrid [props]="gridProps" />`
|
|
124
|
-
})
|
|
125
|
-
export class GridComponent {
|
|
126
|
-
gridProps = {
|
|
127
|
-
columns: [
|
|
128
|
-
{ columnId: 'id', name: 'ID', type: 'numeric' },
|
|
129
|
-
{ columnId: 'name', name: 'Name', sortable: true },
|
|
130
|
-
{ columnId: 'revenue', name: 'Revenue', type: 'numeric', sortable: true },
|
|
131
|
-
{ columnId: 'region', name: 'Region', sortable: true },
|
|
132
|
-
] as IColumnDef<Row>[],
|
|
133
|
-
data: largeDataset, // e.g. 50,000 rows
|
|
134
|
-
getRowId: (item: Row) => item.id,
|
|
135
|
-
workerSort: true,
|
|
136
|
-
statusBar: true,
|
|
137
|
-
};
|
|
138
|
-
}
|
|
139
|
-
```
|
|
140
|
-
|
|
141
|
-
:::tip Switching UI libraries
|
|
142
|
-
Same API across Angular packages. Change the import:
|
|
143
|
-
|
|
144
|
-
- **Radix (CDK)**: `from '@alaarab/ogrid-angular-radix'` *(default, lightweight)*
|
|
145
|
-
- **Angular Material**: `from '@alaarab/ogrid-angular-material'`
|
|
146
|
-
- **PrimeNG**: `from '@alaarab/ogrid-angular-primeng'`
|
|
147
|
-
|
|
148
|
-
All components are standalone — no NgModule required.
|
|
149
|
-
:::
|
|
150
|
-
|
|
151
|
-
</TabItem>
|
|
152
|
-
<TabItem value="vue" label="Vue">
|
|
153
|
-
|
|
154
|
-
```vue
|
|
155
|
-
<script setup lang="ts">
|
|
156
|
-
|
|
157
|
-
interface Row {
|
|
158
|
-
id: number;
|
|
159
|
-
name: string;
|
|
160
|
-
revenue: number;
|
|
161
|
-
region: string;
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
const columns: IColumnDef<Row>[] = [
|
|
165
|
-
{ columnId: 'id', name: 'ID', type: 'numeric' },
|
|
166
|
-
{ columnId: 'name', name: 'Name', sortable: true },
|
|
167
|
-
{ columnId: 'revenue', name: 'Revenue', type: 'numeric', sortable: true },
|
|
168
|
-
{ columnId: 'region', name: 'Region', sortable: true },
|
|
169
|
-
];
|
|
170
|
-
|
|
171
|
-
const gridProps = {
|
|
172
|
-
columns,
|
|
173
|
-
data: largeDataset, // e.g. 50,000 rows
|
|
174
|
-
getRowId: (item: Row) => item.id,
|
|
175
|
-
workerSort: true,
|
|
176
|
-
statusBar: true,
|
|
177
|
-
};
|
|
178
|
-
</script>
|
|
179
|
-
|
|
180
|
-
<template>
|
|
181
|
-
<OGrid :gridProps="gridProps" />
|
|
182
|
-
</template>
|
|
183
|
-
```
|
|
184
|
-
|
|
185
|
-
:::tip Switching UI libraries
|
|
186
|
-
Same API across Vue packages. Change the import:
|
|
187
|
-
|
|
188
|
-
- **Radix (Headless UI)**: `from '@alaarab/ogrid-vue-radix'` *(default, lightweight)*
|
|
189
|
-
- **Vuetify**: `from '@alaarab/ogrid-vue-vuetify'` - wrap in `<v-app>` for theming
|
|
190
|
-
- **PrimeVue**: `from '@alaarab/ogrid-vue-primevue'`
|
|
191
|
-
:::
|
|
192
|
-
|
|
193
|
-
</TabItem>
|
|
194
|
-
<TabItem value="js" label="Vanilla JS">
|
|
195
|
-
|
|
196
|
-
```js
|
|
197
|
-
|
|
198
|
-
const grid = new OGrid(document.getElementById('grid'), {
|
|
199
|
-
columns: [
|
|
200
|
-
{ columnId: 'id', name: 'ID', type: 'numeric' },
|
|
201
|
-
{ columnId: 'name', name: 'Name', sortable: true },
|
|
202
|
-
{ columnId: 'revenue', name: 'Revenue', type: 'numeric', sortable: true },
|
|
203
|
-
{ columnId: 'region', name: 'Region', sortable: true },
|
|
204
|
-
],
|
|
205
|
-
data: largeDataset, // e.g. 50,000 rows
|
|
206
|
-
getRowId: (r) => r.id,
|
|
207
|
-
workerSort: true,
|
|
208
|
-
statusBar: true,
|
|
209
|
-
});
|
|
210
|
-
```
|
|
211
|
-
|
|
212
107
|
</TabItem>
|
|
213
108
|
</Tabs>
|
|
214
109
|
|
|
@@ -289,94 +184,8 @@ Same props across all React packages — just change the import:
|
|
|
289
184
|
|
|
290
185
|
- **Radix** (lightweight, default): `from '@alaarab/ogrid-react-radix'`
|
|
291
186
|
- **Fluent UI** (Microsoft 365 / SPFx): `from '@alaarab/ogrid-react-fluent'` - wrap in `<FluentProvider>`
|
|
292
|
-
- **Material UI** (MUI v7): `from '@alaarab/ogrid-react-material'` - wrap in `<ThemeProvider>`
|
|
293
187
|
:::
|
|
294
188
|
|
|
295
|
-
</TabItem>
|
|
296
|
-
<TabItem value="angular" label="Angular">
|
|
297
|
-
|
|
298
|
-
```typescript
|
|
299
|
-
gridProps = {
|
|
300
|
-
columns, // 100 columns
|
|
301
|
-
data: largeData, // 100,000 rows
|
|
302
|
-
getRowId: (item: Row) => item.id,
|
|
303
|
-
virtualScroll: {
|
|
304
|
-
enabled: true,
|
|
305
|
-
rowHeight: 36,
|
|
306
|
-
overscan: 5,
|
|
307
|
-
columns: true,
|
|
308
|
-
columnOverscan: 2,
|
|
309
|
-
},
|
|
310
|
-
workerSort: true,
|
|
311
|
-
statusBar: true,
|
|
312
|
-
};
|
|
313
|
-
```
|
|
314
|
-
|
|
315
|
-
:::tip Switching UI libraries
|
|
316
|
-
Same API across Angular packages. Change the import:
|
|
317
|
-
|
|
318
|
-
- **Radix (CDK)**: `from '@alaarab/ogrid-angular-radix'` *(default, lightweight)*
|
|
319
|
-
- **Angular Material**: `from '@alaarab/ogrid-angular-material'`
|
|
320
|
-
- **PrimeNG**: `from '@alaarab/ogrid-angular-primeng'`
|
|
321
|
-
|
|
322
|
-
All components are standalone — no NgModule required.
|
|
323
|
-
:::
|
|
324
|
-
|
|
325
|
-
</TabItem>
|
|
326
|
-
<TabItem value="vue" label="Vue">
|
|
327
|
-
|
|
328
|
-
```vue
|
|
329
|
-
<script setup lang="ts">
|
|
330
|
-
const gridProps = {
|
|
331
|
-
columns, // 100 columns
|
|
332
|
-
data: largeData, // 100,000 rows
|
|
333
|
-
getRowId: (item: Row) => item.id,
|
|
334
|
-
virtualScroll: {
|
|
335
|
-
enabled: true,
|
|
336
|
-
rowHeight: 36,
|
|
337
|
-
overscan: 5,
|
|
338
|
-
columns: true,
|
|
339
|
-
columnOverscan: 2,
|
|
340
|
-
},
|
|
341
|
-
workerSort: true,
|
|
342
|
-
statusBar: true,
|
|
343
|
-
};
|
|
344
|
-
</script>
|
|
345
|
-
|
|
346
|
-
<template>
|
|
347
|
-
<OGrid :gridProps="gridProps" />
|
|
348
|
-
</template>
|
|
349
|
-
```
|
|
350
|
-
|
|
351
|
-
:::tip Switching UI libraries
|
|
352
|
-
Same API across Vue packages. Change the import:
|
|
353
|
-
|
|
354
|
-
- **Radix (Headless UI)**: `from '@alaarab/ogrid-vue-radix'` *(default, lightweight)*
|
|
355
|
-
- **Vuetify**: `from '@alaarab/ogrid-vue-vuetify'` - wrap in `<v-app>` for theming
|
|
356
|
-
- **PrimeVue**: `from '@alaarab/ogrid-vue-primevue'`
|
|
357
|
-
:::
|
|
358
|
-
|
|
359
|
-
</TabItem>
|
|
360
|
-
<TabItem value="js" label="Vanilla JS">
|
|
361
|
-
|
|
362
|
-
```js
|
|
363
|
-
|
|
364
|
-
const grid = new OGrid(document.getElementById('grid'), {
|
|
365
|
-
columns, // 100 columns
|
|
366
|
-
data: largeData, // 100,000 rows
|
|
367
|
-
getRowId: (r) => r.id,
|
|
368
|
-
virtualScroll: {
|
|
369
|
-
enabled: true,
|
|
370
|
-
rowHeight: 36,
|
|
371
|
-
overscan: 5,
|
|
372
|
-
columns: true,
|
|
373
|
-
columnOverscan: 2,
|
|
374
|
-
},
|
|
375
|
-
workerSort: true,
|
|
376
|
-
statusBar: true,
|
|
377
|
-
});
|
|
378
|
-
```
|
|
379
|
-
|
|
380
189
|
</TabItem>
|
|
381
190
|
</Tabs>
|
|
382
191
|
|