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

[TreeView] Type-ahead do not respect the order of the items #12826

Closed
flaviendelangle opened this issue Apr 18, 2024 · 1 comment · Fixed by #12827
Closed

[TreeView] Type-ahead do not respect the order of the items #12826

flaviendelangle opened this issue Apr 18, 2024 · 1 comment · Fixed by #12827
Assignees
Labels
bug 🐛 Something doesn't work component: tree view TreeView, TreeItem. This is the name of the generic UI component, not the React module!

Comments

@flaviendelangle
Copy link
Member

flaviendelangle commented Apr 18, 2024

Steps to reproduce

Link to live example: (required)

Steps:

  1. Go to https://stackblitz.com/edit/react-y8wvxr?file=Demo.tsx
  2. Focus the 1st item (A3)
  3. Type "A"

Current behavior

"A1" is focus

Expected behavior

"A2" should be focused

Context

The code uses Object.keys which is not ordered and in any case the order in which is item are registered in the first char map is not reliable.

Your environment

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

Search keywords: type-ahead

@flaviendelangle flaviendelangle added status: waiting for maintainer These issues haven't been looked at yet by a maintainer bug 🐛 Something doesn't work component: tree view TreeView, TreeItem. 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 18, 2024
@flaviendelangle flaviendelangle self-assigned this Apr 18, 2024
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.

@flaviendelangle: 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!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant