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!

Home Page:https://mui.com/x/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[tree view] do onContextMenu and scroll TreeItem to container's top position when the children tree height upper than parent container

1uciuszzz opened this issue · comments

Latest version

  • I have tested the latest version

Steps to reproduce

Link to live example: (required)
https://codesandbox.io/p/sandbox/muix-simpletreeview-bug-p46mc2

Steps:

  1. expand all the children items
  2. right click the second child item
  3. the child item will scroll to the container's top

Current behavior

No response

Expected behavior

No response

Context

No response

Your environment

npx @mui/envinfo
System:
    OS: Windows 10 10.0.19044
  Binaries:
    Node: 20.16.0 - C:\Program Files\nodejs\node.EXE
    npm: 10.8.2 - C:\Program Files\nodejs\npm.CMD
    pnpm: Not Found
  Browsers:
    Chrome: Not Found
    Edge: Chromium (127.0.2651.74)
  npmPackages:
    @emotion/react: ^11.11.1 => 11.13.0
    @emotion/styled: ^11.11.0 => 11.13.0
    @mui/base:  5.0.0-beta.40
    @mui/core-downloads-tracker:  5.16.5
    @mui/icons-material: ^5.14.15 => 5.16.5
    @mui/lab: 5.0.0-alpha.170 => 5.0.0-alpha.170
    @mui/material: ^5.15.14 => 5.16.5
    @mui/private-theming:  5.16.5
    @mui/styled-engine:  5.16.4
    @mui/system:  5.16.5
    @mui/types:  7.2.15
    @mui/utils:  5.16.5
    @mui/x-charts: ^7.2.0 => 7.11.1
    @mui/x-data-grid: ^7.2.0 => 7.11.1
    @mui/x-date-pickers: ^7.2.0 => 7.11.1
    @mui/x-internals:  7.11.1
    @mui/x-tree-view: ^7.2.0 => 7.11.1
    @types/react: ^18.2.33 => 18.3.3
    react: ^18.2.0 => 18.3.1
    react-dom: ^18.2.0 => 18.3.1
    typescript: ^5.2.2 => 5.5.4

Search keywords: bug

Thanks for reaching out! To better understand the problem you're facing, could you provide some additional information?

Detailed Description:
A more detailed explanation of the issue would be very helpful. What behavior are you expecting, and what's actually happening?

Minimal Reproduction:
If possible, creating a stripped-down test case that reproduces the issue would be fantastic. This helps us isolate the problem and diagnose it faster.

Live Example:
A live example (e.g., Stackblitz, codesandbox) showcasing the issue would be even better!

We have some resources to help you create a minimal reproduction:

Support Documentation:
Support - Bug reproduction


Here are some additional tips:

Clean Code:
Focusing on clean and functional code with minimal dependencies will make it easier to identify the issue.

Problem Clarification:
Sometimes, the process of creating a minimal reproduction can even help you clarify the problem itself!

Thanks for your understanding! 🙇🏼

ok, i change the link to live example, now we have an shared editor. please help fix it