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

[core] Add typing to the details argument #2512

Merged
merged 8 commits into from
Sep 7, 2021

Conversation

flaviendelangle
Copy link
Member

@flaviendelangle flaviendelangle commented Aug 31, 2021

  • Remove the details argument from the typing of isCellEditable, isRowSelectable, getClassClassName and getRowClassName (it is not passed to those callbacks)
  • Type the details argument of the other callbacks

@flaviendelangle flaviendelangle added core Infrastructure work going on behind the scenes typescript labels Aug 31, 2021
@flaviendelangle flaviendelangle self-assigned this Aug 31, 2021
Copy link
Member

@m4theushw m4theushw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some props are missing the details argument in the markdown, but I would not spend spend too much time trying to keep the docs up-to-date with the actual code. The documentation for the components is almost done in #2465.

| <span class="prop-name">onCellDoubleClick</span> | <span class="prop-type">(params: GridCellParams, event: MuiEvent<React.MouseEvent>, details?: any) => void</span> | | Callback fired when a double click event comes from a cell element. |
| <span class="prop-name">onCellBlur</span> | <span class="prop-type">(params: GridCellParams, event: MuiEvent<React.FocusEvent>, details: GridCallbackDetails) => void</span> | | Callback fired when the active element leaves a cell. |
| <span class="prop-name">onCellClick</span> | <span class="prop-type">(params: GridCellParams, event: MuiEvent<React.MouseEvent>, details: GridCallbackDetails) => void</span> | | Callback fired when a click event comes from a cell element. |
| <span class="prop-name">onCellDoubleClick</span> | <span class="prop-type">(params: GridCellParams, event: MuiEvent<React.MouseEvent>, details: GridCallbackDetails) => void</span> | | Callback fired when a double click event comes from a cell element. |
| <span class="prop-name">onCellFocusOut</span> | <span class="prop-type">(params: GridCellParams, event?: MuiEvent<MouseEvent>) => void</span> | | Callback fired when a cell loses focus. |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The details argument is missing here.

Copy link
Member Author

@flaviendelangle flaviendelangle Sep 6, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If #2465 is almost done, can we not add it manually on this PR ?

@flaviendelangle flaviendelangle merged commit 4574a75 into mui:next Sep 7, 2021
@flaviendelangle flaviendelangle deleted the type-details branch October 9, 2021 07:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Infrastructure work going on behind the scenes typescript
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants