Skip to content

Commit 10e9242

Browse files
Copilothotlong
andcommitted
Fix table and form demo loading issues - Updated table schema properties and added ObjectUIProvider to layout
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
1 parent 4665251 commit 10e9242

2 files changed

Lines changed: 9 additions & 6 deletions

File tree

apps/site/app/layout.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { RootProvider } from 'fumadocs-ui/provider/next';
22
import './global.css';
33
import '@object-ui/components/style.css';
44
import { Inter } from 'next/font/google';
5+
import { ObjectUIProvider } from '@/app/components/ObjectUIProvider';
56

67
const inter = Inter({
78
subsets: ['latin'],
@@ -11,7 +12,9 @@ export default function Layout({ children }: LayoutProps<'/'>) {
1112
return (
1213
<html lang="en" className={inter.className} suppressHydrationWarning>
1314
<body className="flex flex-col min-h-screen">
14-
<RootProvider>{children}</RootProvider>
15+
<RootProvider>
16+
<ObjectUIProvider>{children}</ObjectUIProvider>
17+
</RootProvider>
1518
</body>
1619
</html>
1720
);

content/docs/components/complex/table.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ import { ComponentDemo, DemoGrid } from '@/app/components/ComponentDemo';
1212
type: "table",
1313
columns: [
1414
{
15-
key: "name",
16-
title: "Name"
15+
header: "Name",
16+
accessorKey: "name"
1717
},
1818
{
19-
key: "email",
20-
title: "Email"
19+
header: "Email",
20+
accessorKey: "email"
2121
}
2222
],
2323
data: [
@@ -39,7 +39,7 @@ import { ComponentDemo, DemoGrid } from '@/app/components/ComponentDemo';
3939
```typescript
4040
interface TableSchema {
4141
type: 'table';
42-
columns: Array<{ key: string; title: string }>;
42+
columns: Array<{ header: string; accessorKey: string }>;
4343
data: Record<string, any>[];
4444
}
4545
```

0 commit comments

Comments
 (0)