Skip to content

Commit 3d2fd1d

Browse files
committed
test(ui): resolve the data-table renderer at module scope in the round-3 locale pin (#25916)
react-hooks/static-components refused the in-render registry lookup. Claude-Session: https://claude.ai/code/session_01C6T942afhqAP5w9XBmfTDC Co-authored-by: Claude <noreply@anthropic.com>
1 parent d0fdc5f commit 3d2fd1d

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎ui/packages/components/src/__tests__/renderer-copy-locale-25916.test.tsx‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,10 @@ function withLanguage(element: React.ReactElement, language: 'zh' | null) {
5555

5656
const ALPHA = { id: 'a', name: 'Alpha', qty: 10 };
5757

58+
/** Resolved once, at module scope: the renderers registered above. */
59+
const Table = ComponentRegistry.get('data-table')!;
60+
5861
function DataTable({ onRowClick }: { onRowClick?: () => void }) {
59-
const Table = ComponentRegistry.get('data-table')!;
6062
const schema = {
6163
type: 'data-table',
6264
editable: true,

0 commit comments

Comments
 (0)