@mui/x-data-grid-premium
Version:
The Premium plan edition of the MUI X Data Grid Components.
11 lines (10 loc) • 658 B
JavaScript
'use client';
import * as React from 'react';
import { GridChartsIntegrationContext } from "../../components/chartsIntegration/GridChartsIntegrationContext.js";
export const useGridChartsIntegrationContext = (ignoreError = false) => {
const context = React.useContext(GridChartsIntegrationContext);
if (!context && !ignoreError) {
throw new Error(['MUI X: Could not find the Data Grid charts integration context.', 'It looks like you rendered your component outside of a DataGrid, DataGridPro or DataGridPremium parent component.', 'This can also happen if you are bundling multiple versions of the Data Grid.'].join('\n'));
}
return context;
};