We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c0d0360 commit 39f4f8bCopy full SHA for 39f4f8b
packages/plugin-grid/src/index.tsx
@@ -8,6 +8,7 @@
8
9
import React from 'react';
10
import { ComponentRegistry } from '@object-ui/core';
11
+import { useSchemaContext } from '@object-ui/react';
12
import { ObjectGrid } from './ObjectGrid';
13
import { VirtualGrid } from './VirtualGrid';
14
@@ -17,7 +18,8 @@ export type { VirtualGridProps, VirtualGridColumn } from './VirtualGrid';
17
18
19
// Register object-grid component
20
const ObjectGridRenderer: React.FC<{ schema: any }> = ({ schema }) => {
- return <ObjectGrid schema={schema} dataSource={null as any} />;
21
+ const { dataSource } = useSchemaContext() || {};
22
+ return <ObjectGrid schema={schema} dataSource={dataSource} />;
23
};
24
25
ComponentRegistry.register('object-grid', ObjectGridRenderer, {
0 commit comments