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

[tree view] groupTransition slot prop doesn't accept transition props #15526

Closed
cemreyavuz opened this issue Nov 21, 2024 · 4 comments · Fixed by #15534
Closed

[tree view] groupTransition slot prop doesn't accept transition props #15526

cemreyavuz opened this issue Nov 21, 2024 · 4 comments · Fixed by #15534
Labels
bug 🐛 Something doesn't work component: tree view TreeView, TreeItem. This is the name of the generic UI component, not the React module! typescript

Comments

@cemreyavuz
Copy link

cemreyavuz commented Nov 21, 2024

Steps to reproduce

Steps:

  1. Open this link to live example: https://codesandbox.io/p/sandbox/sharp-river-xl9n2k
  2. Open Demo.tsx file
  3. Check L20-23

Current behavior

I cannot use transition props like enter and exit as part of slotProps.groupTransition for TreeView or TreeItem.

For TreeItem, it's typed as groupTransition?: SlotComponentProps<'div', {}, {}>;:

groupTransition?: SlotComponentProps<'div', {}, {}>;

It probably should be sth like groupTransition?: SlotComponentPropsFromProps<TransitionProps, {}, {}>; (at least this was working fine in older versions).

Expected behavior

I expect to use transition props like enter and exit as part of slotProps.groupTransition.

Context

No response

Your environment

"dependencies": {
    "@emotion/react": "latest",
    "@emotion/styled": "latest",
    "@mui/material": "latest",
    "@mui/x-tree-view": "8.0.0-alpha.0",
    "@types/react": "latest",
    "@types/react-dom": "latest",
    "react": "latest",
    "react-dom": "latest",
    "typescript": "latest"
  },

Search keywords: TreeView, TreeItem, groupTransition

@cemreyavuz cemreyavuz added bug 🐛 Something doesn't work status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Nov 21, 2024
@github-actions github-actions bot added the component: tree view TreeView, TreeItem. This is the name of the generic UI component, not the React module! label Nov 21, 2024
@michelengelen
Copy link
Member

Hey @cemreyavuz
Thanks for opening this issue. I'll leave this one to @flaviendelangle as he is the master of types on the tree view components! 🥷

@michelengelen michelengelen added typescript and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Nov 21, 2024
@michelengelen michelengelen changed the title groupTransition slot prop doesn't accept transition props [tree view] groupTransition slot prop doesn't accept transition props Nov 21, 2024
@flaviendelangle
Copy link
Member

Indeed, I'll fix that 👍

@cemreyavuz
Copy link
Author

Thanks for the very swift response 🙌🏻

Copy link

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.

Note

@cemreyavuz 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
bug 🐛 Something doesn't work component: tree view TreeView, TreeItem. This is the name of the generic UI component, not the React module! typescript
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants