@alaarab/ogrid-mcp 2.9.0 → 2.11.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/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 @@ The Side Bar adds a collapsible panel alongside the grid with two built-in panel
|
|
|
14
14
|
<SideBarDemo />
|
|
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
|
<Tabs groupId="framework">
|
|
@@ -37,85 +37,8 @@ The `OGrid` component has the same props across all React UI packages. To switch
|
|
|
37
37
|
|
|
38
38
|
- **Radix** (lightweight, default): `from '@alaarab/ogrid-react-radix'`
|
|
39
39
|
- **Fluent UI** (Microsoft 365 / SPFx): `from '@alaarab/ogrid-react-fluent'` - wrap in `<FluentProvider>`
|
|
40
|
-
- **Material UI** (MUI v7): `from '@alaarab/ogrid-react-material'` - wrap in `<ThemeProvider>`
|
|
41
40
|
:::
|
|
42
41
|
|
|
43
|
-
</TabItem>
|
|
44
|
-
<TabItem value="angular" label="Angular">
|
|
45
|
-
|
|
46
|
-
```typescript
|
|
47
|
-
|
|
48
|
-
@Component({
|
|
49
|
-
standalone: true,
|
|
50
|
-
imports: [OGridComponent],
|
|
51
|
-
template: `<ogrid [props]="gridProps" />`
|
|
52
|
-
})
|
|
53
|
-
export class GridComponent {
|
|
54
|
-
gridProps = {
|
|
55
|
-
columns: columns,
|
|
56
|
-
data: items,
|
|
57
|
-
getRowId: (item: Item) => item.id,
|
|
58
|
-
sideBar: true,
|
|
59
|
-
columnChooser: 'sidebar' as const,
|
|
60
|
-
pagination: true,
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
:::tip Switching UI libraries
|
|
66
|
-
Same component API across Angular packages. To switch, just change the import:
|
|
67
|
-
|
|
68
|
-
- **Radix (CDK)**: `from '@alaarab/ogrid-angular-radix'` *(default, lightweight)*
|
|
69
|
-
- **Angular Material**: `from '@alaarab/ogrid-angular-material'`
|
|
70
|
-
- **PrimeNG**: `from '@alaarab/ogrid-angular-primeng'`
|
|
71
|
-
|
|
72
|
-
All components are standalone - no NgModule required.
|
|
73
|
-
:::
|
|
74
|
-
|
|
75
|
-
</TabItem>
|
|
76
|
-
<TabItem value="vue" label="Vue">
|
|
77
|
-
|
|
78
|
-
```vue
|
|
79
|
-
<script setup lang="ts">
|
|
80
|
-
|
|
81
|
-
const gridProps = {
|
|
82
|
-
columns,
|
|
83
|
-
data: items,
|
|
84
|
-
getRowId: (item) => item.id,
|
|
85
|
-
sideBar: true,
|
|
86
|
-
columnChooser: 'sidebar' as const,
|
|
87
|
-
pagination: 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: items,
|
|
112
|
-
getRowId: (item) => item.id,
|
|
113
|
-
sideBar: true,
|
|
114
|
-
columnChooser: 'sidebar',
|
|
115
|
-
pagination: true,
|
|
116
|
-
});
|
|
117
|
-
```
|
|
118
|
-
|
|
119
42
|
</TabItem>
|
|
120
43
|
</Tabs>
|
|
121
44
|
|
|
@@ -11,8 +11,8 @@ Click a column header to sort. Click again to reverse. Click a third time to cle
|
|
|
11
11
|
|
|
12
12
|
<SortingDemo />
|
|
13
13
|
|
|
14
|
-
:::tip Try it
|
|
15
|
-
The demo uses Radix UI styling.
|
|
14
|
+
:::tip Try it with Fluent UI
|
|
15
|
+
The demo uses Radix UI styling. Switch the import to `@alaarab/ogrid-react-fluent` and the sort indicator renders in the Fluent UI v9 style — no other code changes.
|
|
16
16
|
:::
|
|
17
17
|
|
|
18
18
|
## Make a column sortable
|
|
@@ -54,114 +54,8 @@ Same props across all React packages — just change the import:
|
|
|
54
54
|
|
|
55
55
|
- **Radix** (lightweight, default): `from '@alaarab/ogrid-react-radix'`
|
|
56
56
|
- **Fluent UI** (Microsoft 365 / SPFx): `from '@alaarab/ogrid-react-fluent'` - wrap in `<FluentProvider>`
|
|
57
|
-
- **Material UI** (MUI v7): `from '@alaarab/ogrid-react-material'` - wrap in `<ThemeProvider>`
|
|
58
57
|
:::
|
|
59
58
|
|
|
60
|
-
</TabItem>
|
|
61
|
-
<TabItem value="angular" label="Angular">
|
|
62
|
-
|
|
63
|
-
```typescript
|
|
64
|
-
|
|
65
|
-
@Component({
|
|
66
|
-
standalone: true,
|
|
67
|
-
imports: [OGridComponent],
|
|
68
|
-
template: `<ogrid [props]="gridProps" />`
|
|
69
|
-
})
|
|
70
|
-
export class GridComponent {
|
|
71
|
-
gridProps = {
|
|
72
|
-
columns: [
|
|
73
|
-
{ columnId: 'name', name: 'Name', sortable: true },
|
|
74
|
-
{ columnId: 'age', name: 'Age', sortable: true, type: 'numeric' },
|
|
75
|
-
{ columnId: 'department', name: 'Department', sortable: true },
|
|
76
|
-
{
|
|
77
|
-
columnId: 'salary',
|
|
78
|
-
name: 'Salary',
|
|
79
|
-
sortable: true,
|
|
80
|
-
type: 'numeric',
|
|
81
|
-
valueFormatter: (v: unknown) => `$${Number(v).toLocaleString()}`,
|
|
82
|
-
},
|
|
83
|
-
] as IColumnDef<Person>[],
|
|
84
|
-
data: people,
|
|
85
|
-
getRowId: (item: Person) => item.id,
|
|
86
|
-
defaultPageSize: 10,
|
|
87
|
-
};
|
|
88
|
-
}
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
:::tip Switching UI libraries
|
|
92
|
-
Same API across Angular packages. 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', sortable: true },
|
|
109
|
-
{ columnId: 'age', name: 'Age', sortable: true, type: 'numeric' },
|
|
110
|
-
{ columnId: 'department', name: 'Department', sortable: true },
|
|
111
|
-
{
|
|
112
|
-
columnId: 'salary',
|
|
113
|
-
name: 'Salary',
|
|
114
|
-
sortable: true,
|
|
115
|
-
type: 'numeric',
|
|
116
|
-
valueFormatter: (v) => `$${Number(v).toLocaleString()}`,
|
|
117
|
-
},
|
|
118
|
-
];
|
|
119
|
-
|
|
120
|
-
const gridProps = {
|
|
121
|
-
columns,
|
|
122
|
-
data: people,
|
|
123
|
-
getRowId: (item) => item.id,
|
|
124
|
-
defaultPageSize: 10,
|
|
125
|
-
};
|
|
126
|
-
</script>
|
|
127
|
-
|
|
128
|
-
<template>
|
|
129
|
-
<OGrid :gridProps="gridProps" />
|
|
130
|
-
</template>
|
|
131
|
-
```
|
|
132
|
-
|
|
133
|
-
:::tip Switching UI libraries
|
|
134
|
-
Same API across Vue packages. Change the import:
|
|
135
|
-
|
|
136
|
-
- **Radix (Headless UI)**: `from '@alaarab/ogrid-vue-radix'` *(default, lightweight)*
|
|
137
|
-
- **Vuetify**: `from '@alaarab/ogrid-vue-vuetify'` - wrap in `<v-app>` for theming
|
|
138
|
-
- **PrimeVue**: `from '@alaarab/ogrid-vue-primevue'`
|
|
139
|
-
:::
|
|
140
|
-
|
|
141
|
-
</TabItem>
|
|
142
|
-
<TabItem value="js" label="Vanilla JS">
|
|
143
|
-
|
|
144
|
-
```js
|
|
145
|
-
|
|
146
|
-
const grid = new OGrid(document.getElementById('grid'), {
|
|
147
|
-
columns: [
|
|
148
|
-
{ columnId: 'name', name: 'Name', sortable: true },
|
|
149
|
-
{ columnId: 'age', name: 'Age', sortable: true, type: 'numeric' },
|
|
150
|
-
{ columnId: 'department', name: 'Department', sortable: true },
|
|
151
|
-
{
|
|
152
|
-
columnId: 'salary',
|
|
153
|
-
name: 'Salary',
|
|
154
|
-
sortable: true,
|
|
155
|
-
type: 'numeric',
|
|
156
|
-
valueFormatter: (v) => `$${Number(v).toLocaleString()}`,
|
|
157
|
-
},
|
|
158
|
-
],
|
|
159
|
-
data: people,
|
|
160
|
-
getRowId: (item) => item.id,
|
|
161
|
-
pageSize: 10,
|
|
162
|
-
});
|
|
163
|
-
```
|
|
164
|
-
|
|
165
59
|
</TabItem>
|
|
166
60
|
</Tabs>
|
|
167
61
|
|
|
@@ -13,14 +13,8 @@ OGrid provides Excel-like cell selection out of the box. Click a cell to make it
|
|
|
13
13
|
|
|
14
14
|
<SpreadsheetSelectionDemo />
|
|
15
15
|
|
|
16
|
-
:::tip
|
|
17
|
-
The live demo above shows **
|
|
18
|
-
- **React** - Radix UI styling
|
|
19
|
-
- **Angular** - Angular Material styling
|
|
20
|
-
- **Vue** - Vuetify styling
|
|
21
|
-
- **JS** - Vanilla JS default theme
|
|
22
|
-
|
|
23
|
-
Each framework renders OGrid with its native components, so the look and feel matches your design system.
|
|
16
|
+
:::tip UI styling
|
|
17
|
+
The live demo above shows **Radix UI** styling (lightweight default). The same feature renders through the Fluent UI package with its native components.
|
|
24
18
|
:::
|
|
25
19
|
|
|
26
20
|
## Quick Example
|
|
@@ -47,79 +41,8 @@ The `OGrid` component has the same props across all React UI packages. To switch
|
|
|
47
41
|
|
|
48
42
|
- **Radix** (lightweight, default): `from '@alaarab/ogrid-react-radix'`
|
|
49
43
|
- **Fluent UI** (Microsoft 365 / SPFx): `from '@alaarab/ogrid-react-fluent'` - wrap in `<FluentProvider>`
|
|
50
|
-
- **Material UI** (MUI v7): `from '@alaarab/ogrid-react-material'` - wrap in `<ThemeProvider>`
|
|
51
44
|
:::
|
|
52
45
|
|
|
53
|
-
</TabItem>
|
|
54
|
-
<TabItem value="angular" label="Angular">
|
|
55
|
-
|
|
56
|
-
```typescript
|
|
57
|
-
|
|
58
|
-
@Component({
|
|
59
|
-
standalone: true,
|
|
60
|
-
imports: [OGridComponent],
|
|
61
|
-
template: `<ogrid [props]="gridProps" />`
|
|
62
|
-
})
|
|
63
|
-
export class GridComponent {
|
|
64
|
-
gridProps = {
|
|
65
|
-
columns,
|
|
66
|
-
data: items,
|
|
67
|
-
getRowId: (item: any) => item.id,
|
|
68
|
-
cellSelection: true,
|
|
69
|
-
};
|
|
70
|
-
}
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
:::tip Switching UI libraries
|
|
74
|
-
Same component API across Angular packages. To switch, just change the import:
|
|
75
|
-
|
|
76
|
-
- **Radix (CDK)**: `from '@alaarab/ogrid-angular-radix'` *(default, lightweight)*
|
|
77
|
-
- **Angular Material**: `from '@alaarab/ogrid-angular-material'`
|
|
78
|
-
- **PrimeNG**: `from '@alaarab/ogrid-angular-primeng'`
|
|
79
|
-
|
|
80
|
-
All components are standalone - no NgModule required.
|
|
81
|
-
:::
|
|
82
|
-
|
|
83
|
-
</TabItem>
|
|
84
|
-
<TabItem value="vue" label="Vue">
|
|
85
|
-
|
|
86
|
-
```vue
|
|
87
|
-
<script setup lang="ts">
|
|
88
|
-
|
|
89
|
-
const gridProps = {
|
|
90
|
-
columns,
|
|
91
|
-
data: items,
|
|
92
|
-
getRowId: (item) => item.id,
|
|
93
|
-
cellSelection: true,
|
|
94
|
-
};
|
|
95
|
-
</script>
|
|
96
|
-
|
|
97
|
-
<template>
|
|
98
|
-
<OGrid :gridProps="gridProps" />
|
|
99
|
-
</template>
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
:::tip Switching UI libraries
|
|
103
|
-
Same component API across Vue packages. To switch, just change the import:
|
|
104
|
-
|
|
105
|
-
- **Radix (Headless UI)**: `from '@alaarab/ogrid-vue-radix'` *(default, lightweight)*
|
|
106
|
-
- **Vuetify**: `from '@alaarab/ogrid-vue-vuetify'` - wrap in `<v-app>` for theming
|
|
107
|
-
- **PrimeVue**: `from '@alaarab/ogrid-vue-primevue'`
|
|
108
|
-
:::
|
|
109
|
-
|
|
110
|
-
</TabItem>
|
|
111
|
-
<TabItem value="js" label="Vanilla JS">
|
|
112
|
-
|
|
113
|
-
```js
|
|
114
|
-
|
|
115
|
-
const grid = new OGrid(document.getElementById('grid'), {
|
|
116
|
-
columns: columns,
|
|
117
|
-
data: items,
|
|
118
|
-
getRowId: (item) => item.id,
|
|
119
|
-
cellSelection: true,
|
|
120
|
-
});
|
|
121
|
-
```
|
|
122
|
-
|
|
123
46
|
</TabItem>
|
|
124
47
|
</Tabs>
|
|
125
48
|
|
|
@@ -14,7 +14,7 @@ The status bar sits at the bottom of the grid and displays row counts, filter co
|
|
|
14
14
|
<StatusBarDemo />
|
|
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,79 +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
|
-
statusBar: 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
|
-
statusBar: 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
|
-
statusBar: true,
|
|
114
|
-
});
|
|
115
|
-
```
|
|
116
|
-
|
|
117
46
|
</TabItem>
|
|
118
47
|
</Tabs>
|
|
119
48
|
|
|
@@ -22,7 +22,7 @@ With no extra props, OGrid renders a toolbar strip containing only the column ch
|
|
|
22
22
|
<ToolbarDefaultDemo />
|
|
23
23
|
|
|
24
24
|
:::tip Try it in your framework
|
|
25
|
-
The demo above uses Radix UI for styling. To see this feature with
|
|
25
|
+
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.
|
|
26
26
|
:::
|
|
27
27
|
|
|
28
28
|
<Tabs groupId="framework">
|
|
@@ -44,82 +44,8 @@ The `OGrid` component has the same props across all React UI packages. To switch
|
|
|
44
44
|
|
|
45
45
|
- **Radix** (lightweight, default): `from '@alaarab/ogrid-react-radix'`
|
|
46
46
|
- **Fluent UI** (Microsoft 365 / SPFx): `from '@alaarab/ogrid-react-fluent'` - wrap in `<FluentProvider>`
|
|
47
|
-
- **Material UI** (MUI v7): `from '@alaarab/ogrid-react-material'` - wrap in `<ThemeProvider>`
|
|
48
47
|
:::
|
|
49
48
|
|
|
50
|
-
</TabItem>
|
|
51
|
-
<TabItem value="angular" label="Angular">
|
|
52
|
-
|
|
53
|
-
```typescript
|
|
54
|
-
|
|
55
|
-
@Component({
|
|
56
|
-
standalone: true,
|
|
57
|
-
imports: [OGridComponent],
|
|
58
|
-
template: `<ogrid [props]="gridProps" />`
|
|
59
|
-
})
|
|
60
|
-
export class GridComponent {
|
|
61
|
-
gridProps = {
|
|
62
|
-
columns: columns,
|
|
63
|
-
data: items,
|
|
64
|
-
getRowId: (item: Item) => item.id,
|
|
65
|
-
columnChooser: 'toolbar' as const,
|
|
66
|
-
pagination: true,
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
:::tip Switching UI libraries
|
|
72
|
-
Same component API across Angular packages. To switch, just change the import:
|
|
73
|
-
|
|
74
|
-
- **Radix (CDK)**: `from '@alaarab/ogrid-angular-radix'` *(default, lightweight)*
|
|
75
|
-
- **Angular Material**: `from '@alaarab/ogrid-angular-material'`
|
|
76
|
-
- **PrimeNG**: `from '@alaarab/ogrid-angular-primeng'`
|
|
77
|
-
|
|
78
|
-
All components are standalone - no NgModule required.
|
|
79
|
-
:::
|
|
80
|
-
|
|
81
|
-
</TabItem>
|
|
82
|
-
<TabItem value="vue" label="Vue">
|
|
83
|
-
|
|
84
|
-
```vue
|
|
85
|
-
<script setup lang="ts">
|
|
86
|
-
|
|
87
|
-
const gridProps = {
|
|
88
|
-
columns,
|
|
89
|
-
data: items,
|
|
90
|
-
getRowId: (item) => item.id,
|
|
91
|
-
columnChooser: 'toolbar' as const,
|
|
92
|
-
pagination: true,
|
|
93
|
-
};
|
|
94
|
-
</script>
|
|
95
|
-
|
|
96
|
-
<template>
|
|
97
|
-
<OGrid :gridProps="gridProps" />
|
|
98
|
-
</template>
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
:::tip Switching UI libraries
|
|
102
|
-
Same component API across Vue packages. To switch, just change the import:
|
|
103
|
-
|
|
104
|
-
- **Radix (Headless UI)**: `from '@alaarab/ogrid-vue-radix'` *(default, lightweight)*
|
|
105
|
-
- **Vuetify**: `from '@alaarab/ogrid-vue-vuetify'` - wrap in `<v-app>` for theming
|
|
106
|
-
- **PrimeVue**: `from '@alaarab/ogrid-vue-primevue'`
|
|
107
|
-
:::
|
|
108
|
-
|
|
109
|
-
</TabItem>
|
|
110
|
-
<TabItem value="js" label="Vanilla JS">
|
|
111
|
-
|
|
112
|
-
```js
|
|
113
|
-
|
|
114
|
-
const grid = new OGrid(document.getElementById('grid'), {
|
|
115
|
-
columns: columns,
|
|
116
|
-
data: items,
|
|
117
|
-
getRowId: (item) => item.id,
|
|
118
|
-
columnChooser: true,
|
|
119
|
-
pagination: true,
|
|
120
|
-
});
|
|
121
|
-
```
|
|
122
|
-
|
|
123
49
|
</TabItem>
|
|
124
50
|
</Tabs>
|
|
125
51
|
|