mui / mui-x

MUI X: Build complex and data-rich applications using a growing list of advanced React components, like the Data Grid, Date and Time Pickers, Charts, and more!
https://mui.com/x/
3.82k stars 1.14k forks source link

[data grid] GridColDef valueGetter method's value parameter is always never #12927

Closed hkfi closed 2 weeks ago

hkfi commented 3 weeks ago

Steps to reproduce

Link to live example: (required)

https://codesandbox.io/p/sandbox/quizzical-elbakyan-yhcy5p

Steps:

  1. Go to Demo.tsx
  2. Look at valueGetter method's value parameter. It is typed never, but we should expect the type of the value of the field.

Current behavior

The valueGetter method's value parameter is never.

Expected behavior

We should expect the type of the value of the field instead of never. In this case we should expect a number.

Context

No response

Your environment

npx @mui/envinfo ``` Don't forget to mention which browser you used. Output from `npx @mui/envinfo` goes here. ```

Search keywords: GridColDef, valueGetter, never

michelengelen commented 2 weeks ago

related to #12914

cc @cherniavskii

michelengelen commented 2 weeks ago

possible fix for this: https://github.com/mui/mui-x/issues/12914#issuecomment-2082328462

michelengelen commented 2 weeks ago

I will close this issue, as it is basically a duplicate of #12914 ... just for a different method.

github-actions[bot] commented 2 weeks ago

:warning: 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.

@hkfi: 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.