UNPKG

@mui/x-data-grid

Version:

The community edition of the data grid component (MUI X).

20 lines (18 loc) 710 B
import _extends from "@babel/runtime/helpers/esm/extends"; import * as React from 'react'; import { useGridApiContext } from '../../hooks/utils/useGridApiContext'; import { useGridRootProps } from '../../hooks/utils/useGridRootProps'; import { jsx as _jsx } from "react/jsx-runtime"; export function GridFooterPlaceholder() { const apiRef = useGridApiContext(); const rootProps = useGridRootProps(); const footerRef = React.useRef(null); apiRef.current.footerRef = footerRef; if (rootProps.hideFooter) { return null; } return /*#__PURE__*/_jsx("div", { ref: footerRef, children: /*#__PURE__*/_jsx(rootProps.components.Footer, _extends({}, rootProps.componentsProps?.footer)) }); }