diff --git a/change/@fluentui-react-data-grid-react-window-128a12e2-e75c-434a-97a2-0e7bd90cb1ae.json b/change/@fluentui-react-data-grid-react-window-128a12e2-e75c-434a-97a2-0e7bd90cb1ae.json new file mode 100644 index 0000000000000..3e6cbd8c3a498 --- /dev/null +++ b/change/@fluentui-react-data-grid-react-window-128a12e2-e75c-434a-97a2-0e7bd90cb1ae.json @@ -0,0 +1,7 @@ +{ + "type": "prerelease", + "comment": "chore: adopt custom JSX pragma", + "packageName": "@fluentui/react-data-grid-react-window", + "email": "bernardo.sunderhus@gmail.com", + "dependentChangeType": "patch" +} diff --git a/packages/react-components/react-data-grid-react-window/package.json b/packages/react-components/react-data-grid-react-window/package.json index b6174bea875e5..a6d34525aa1d8 100644 --- a/packages/react-components/react-data-grid-react-window/package.json +++ b/packages/react-components/react-data-grid-react-window/package.json @@ -31,6 +31,7 @@ "dependencies": { "@fluentui/react-table": "^9.2.5", "@fluentui/react-utilities": "^9.7.4", + "@fluentui/react-jsx-runtime": "^9.0.0-alpha.0", "@swc/helpers": "^0.4.14", "react-window": "^1.8.6" }, diff --git a/packages/react-components/react-data-grid-react-window/src/components/DataGridBody/renderDataGridBody.tsx b/packages/react-components/react-data-grid-react-window/src/components/DataGridBody/renderDataGridBody.tsx index 5d4edd062a76a..bd92417ba41bc 100644 --- a/packages/react-components/react-data-grid-react-window/src/components/DataGridBody/renderDataGridBody.tsx +++ b/packages/react-components/react-data-grid-react-window/src/components/DataGridBody/renderDataGridBody.tsx @@ -1,7 +1,10 @@ -import * as React from 'react'; +/** @jsxRuntime classic */ +/** @jsx createElement */ + +import { createElement } from '@fluentui/react-jsx-runtime'; +import { getSlotsNext } from '@fluentui/react-utilities'; import type { DataGridBodyState, DataGridBodySlots } from './DataGridBody.types'; import { FixedSizeList as List, ListChildComponentProps } from 'react-window'; -import { getSlots } from '@fluentui/react-utilities'; import { TableRowData, TableRowIdContextProvider } from '@fluentui/react-table'; import { TableRowIndexContextProvider } from '../../contexts/rowIndexContext'; @@ -9,7 +12,7 @@ import { TableRowIndexContextProvider } from '../../contexts/rowIndexContext'; * Render the final JSX of DataGridVirtualizedBody */ export const renderDataGridBody_unstable = (state: DataGridBodyState) => { - const { slots, slotProps } = getSlots(state); + const { slots, slotProps } = getSlotsNext(state); return (