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

[material-ui][Autocomplete] Allow ordering of the groups #44273

Closed
JORDAAAN1495 opened this issue Oct 30, 2024 · 2 comments
Closed

[material-ui][Autocomplete] Allow ordering of the groups #44273

JORDAAAN1495 opened this issue Oct 30, 2024 · 2 comments
Assignees
Labels
component: autocomplete This is the name of the generic UI component, not the React module! package: material-ui Specific to @mui/material support: question Community support but can be turned into an improvement

Comments

@JORDAAAN1495
Copy link

JORDAAAN1495 commented Oct 30, 2024

Summary

Allow the groups of an autocomplete to be ordered.

Say I have 3 groups of Hello, World, Football, I’d like to be able to control the order the groups get displayed in.

Currently they seem to get displayed in alphabetical order.

I’d like to be able to have a custom order such as

World
Football
Hello

Examples

N/A

Motivation

Allow ordering of groups to provide more valuable information closer to the top of the rendered list

Search keywords: Autocomplete groups ordering

@JORDAAAN1495 JORDAAAN1495 added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Oct 30, 2024
@zannager zannager added the component: autocomplete This is the name of the generic UI component, not the React module! label Oct 30, 2024
@DiegoAndai DiegoAndai assigned DiegoAndai and unassigned mj12albert Nov 29, 2024
@DiegoAndai
Copy link
Member

DiegoAndai commented Nov 29, 2024

Hey @JORDAAAN1495, thanks for reaching out.

The options will appear in the order you provide them, so if you want the groups to appear in a certain order, the options must be ordered accordingly. In this example, all 'World' options first, then all 'Football' options, and finally all 'Hello' options. Here's an example: https://stackblitz.com/edit/react-95zaye?file=Demo.tsx

Let me know if this solves your use case.

@DiegoAndai DiegoAndai added support: question Community support but can be turned into an improvement status: waiting for author Issue with insufficient information package: material-ui Specific to @mui/material and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Nov 29, 2024
@DiegoAndai DiegoAndai changed the title Autocomplete - allow ordering of the groups [material-ui][Autocomplete] Allow ordering of the groups Nov 29, 2024
@DiegoAndai DiegoAndai removed the status: waiting for author Issue with insufficient information label Nov 29, 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.

Note

@JORDAAAN1495 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
component: autocomplete This is the name of the generic UI component, not the React module! package: material-ui Specific to @mui/material support: question Community support but can be turned into an improvement
Projects
None yet
Development

No branches or pull requests

4 participants