Files
ETB/ETB-FrontEnd/node_modules/@mui/x-data-grid/hooks/utils/useGridState.js
Iliyan Angelov 306b20e24a Frontend start
2025-09-14 00:54:48 +03:00

13 lines
677 B
JavaScript

import { buildWarning } from '../../utils/warning';
const deprecationWarning = buildWarning(['MUI: The hook useGridState is deprecated and will be removed in the next major version.', 'The two lines below are equivalent', '', 'const [state, setState, forceUpdate] = useGridState(apiRef);', 'const { state, setState, forceUpdate } = apiRef.current']);
/**
* @deprecated Use `apiRef.current.state`, `apiRef.current.setState` and `apiRef.current.forceUpdate` instead.
*/
export const useGridState = apiRef => {
if (process.env.NODE_ENV !== 'production') {
deprecationWarning();
}
return [apiRef.current.state, apiRef.current.setState, apiRef.current.forceUpdate];
};