We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fb3f23d commit 1b9555bCopy full SHA for 1b9555b
1 file changed
packages/plugin-map/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 { ObjectMap } from './ObjectMap';
13
import type { ObjectMapProps } from './ObjectMap';
14
@@ -16,7 +17,8 @@ export type { ObjectMapProps };
16
17
18
// Register component
19
const ObjectMapRenderer: React.FC<{ schema: any }> = ({ schema }) => {
- return <ObjectMap schema={schema} dataSource={null as any} />;
20
+ const { dataSource } = useSchemaContext();
21
+ return <ObjectMap schema={schema} dataSource={dataSource} />;
22
};
23
24
ComponentRegistry.register('object-map', ObjectMapRenderer, {
0 commit comments