Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The GridValueFormatterParams interface has NOT been removed in v7 #12658

Closed
doberkofler opened this issue Apr 3, 2024 · 1 comment · Fixed by #12660
Closed

The GridValueFormatterParams interface has NOT been removed in v7 #12658

doberkofler opened this issue Apr 3, 2024 · 1 comment · Fixed by #12660
Labels
component: data grid This is the name of the generic UI component, not the React module!

Comments

@doberkofler
Copy link

doberkofler commented Apr 3, 2024

Steps to reproduce

According to the migration guide the GridValueFormatterParams interface should have been removed but it seems as if it still available and the following type of code does not raise any errors.

import type {GridColDef, GridValueFormatterParams} from '@mui/x-data-grid-pro';

export const getColumnTimestamp = (field: string, options?: Partial<GridColDef>): GridColDef => ({
	field,
	resizable: true,
	headerName: 'Timestamp',
	width: 200,
	type: 'dateTime',
	valueFormatter: (params: GridValueFormatterParams<Date | null>): string =>
		params.value === null || !dateIsValid(params.value) ? '' : dateAsTimestamp(params.value),
	...(options ? options : {}),
});

Current behavior

It is still possible in v7 possible to use the GridValueFormatterParams interface and therefore impossible to find the code parts that should be migrated.

Expected behavior

The GridValueFormatterParams interface should no longer be available as specified in the migration guide

Context

No response

Your environment

npx @mui/envinfo
System:
    OS: macOS 14.4.1
  Binaries:
    Node: 20.12.0 - ~/.nvm/versions/node/v20.12.0/bin/node
    npm: 10.5.1 - ~/.nvm/versions/node/v20.12.0/bin/npm
    pnpm: 8.15.6 - ~/.nvm/versions/node/v20.12.0/bin/pnpm
  Browsers:
    Chrome: 123.0.6312.87
    Edge: Not Found
    Safari: 17.4.1
  npmPackages:
    @emotion/react: 11.11.4 => 11.11.4
    @emotion/styled: 11.11.5 => 11.11.5
    @mui/core-downloads-tracker:  5.15.14
    @mui/icons-material: 5.15.14 => 5.15.14
    @mui/material: 5.15.14 => 5.15.14
    @mui/private-theming:  5.15.14
    @mui/styled-engine:  5.15.14
    @mui/system:  5.15.14
    @mui/types:  7.2.14
    @mui/utils:  5.15.14
    @mui/x-data-grid:  7.1.0
    @mui/x-license:  7.0.0
    @types/react: 18.2.74 => 18.2.74
    react: 18.2.0 => 18.2.0
    react-dom: 18.2.0 => 18.2.0
    typescript: 5.4.3 => 5.4.3

Search keywords: GridValueFormatterParams

@doberkofler doberkofler added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Apr 3, 2024
@romgrk romgrk added component: data grid This is the name of the generic UI component, not the React module! and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Apr 3, 2024
Copy link

github-actions bot commented Apr 4, 2024

⚠️ This issue has been closed. If you have a similar problem but not exactly the same, please open a new issue.
Now, if you have additional information related to this issue or things that could help future readers, feel free to leave a comment.

@doberkofler: How did we do? Your experience with our support team matters to us. If you have a moment, please share your thoughts in this short Support Satisfaction survey.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: data grid This is the name of the generic UI component, not the React module!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants