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.79k stars 1.12k forks source link

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

Closed flaviendelangle closed 1 week ago

flaviendelangle commented 2 weeks ago

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

github-actions[bot] commented 1 week 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.

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