Skip to content

Commit 1b9555b

Browse files
committed
Fix ObjectMapRenderer to use schema context for dataSource
1 parent fb3f23d commit 1b9555b

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

packages/plugin-map/src/index.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
import React from 'react';
1010
import { ComponentRegistry } from '@object-ui/core';
11+
import { useSchemaContext } from '@object-ui/react';
1112
import { ObjectMap } from './ObjectMap';
1213
import type { ObjectMapProps } from './ObjectMap';
1314

@@ -16,7 +17,8 @@ export type { ObjectMapProps };
1617

1718
// Register component
1819
const ObjectMapRenderer: React.FC<{ schema: any }> = ({ schema }) => {
19-
return <ObjectMap schema={schema} dataSource={null as any} />;
20+
const { dataSource } = useSchemaContext();
21+
return <ObjectMap schema={schema} dataSource={dataSource} />;
2022
};
2123

2224
ComponentRegistry.register('object-map', ObjectMapRenderer, {

0 commit comments

Comments
 (0)