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

[base-ui][Autocomplete] Virtualization/infinite scroll support #38714

Open
marcpachecog opened this issue Aug 29, 2023 · 11 comments
Open

[base-ui][Autocomplete] Virtualization/infinite scroll support #38714

marcpachecog opened this issue Aug 29, 2023 · 11 comments
Assignees
Labels
component: autocomplete This is the name of the generic UI component, not the React module! new feature New feature or request performance

Comments

@marcpachecog
Copy link

marcpachecog commented Aug 29, 2023

Summary 💡

Dashboard apps often handle extensive data, requiring efficient data management tools. The Autocomplete component is crucial for handling large data sets but lacks optimal performance when dealing with hundreds of records that need pagination.

Solution

Integrate virtualization and infinite scroll features into the MUI Libraries' Autocomplete component.

Benefits

  • Efficiency: Virtualization renders only visible data, ensuring smooth performance even with extensive datasets.
  • Seamless Navigation: Infinite scroll enable users to smoothly explore records without manual clicks.
  • Time Savings: Users can access and review vast datasets quickly.

Examples 🌈

Motivation 🔦

No response

@marcpachecog marcpachecog added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Aug 29, 2023
@marcpachecog
Copy link
Author

marcpachecog commented Aug 29, 2023

Hey @oliviertassinari and @michaldudak, Interested on what are your take about this.

@mj12albert
Copy link
Member

A PR is underway ~ #35653

@brijeshb42 brijeshb42 added component: autocomplete 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 Aug 30, 2023
@brijeshb42
Copy link
Contributor

@ZeeshanTamboli Assigning to you since you already have a PR.

@ZeeshanTamboli
Copy link
Member

It's @sai6855 who worked on it.

@marcpachecog
Copy link
Author

marcpachecog commented Aug 30, 2023

Thanks to all! So a PR about infinite loading is underway, great! But what about virtualization? The current proposed solution in the docs is somewhat boilerplate to implement, there should be some other way to achieve the same functionality. For example Antd has it built-in, even MUI DataGrid Pro has it and you can disable if it the case.

@oliviertassinari
Copy link
Member

oliviertassinari commented Aug 30, 2023

The current proposed solution in the docs is somewhat boilerplate to implement

If we change the demo to be one that can be easily copy and pasted, would it fix the issue? https://mui.com/material-ui/react-autocomplete/#virtualization.

One important constraint is that virtualization is not a so frequent use case, to be verified with the GA events, but only looking at https://github.com/bvaughn/react-virtualized-select feels enough to make this claim. So if we ever make a built in virtualization support, it must be tree-shakable.

@Nic-S
Copy link

Nic-S commented Aug 31, 2023

I honestly believe that it is instead a common use case to have virtualisation.

@michaldudak
Copy link
Member

Some believe it is; some believe it's not, which proves it's best to have it optional.

@oliviertassinari oliviertassinari added the new feature New feature or request label Aug 31, 2023
@marcpachecog
Copy link
Author

@oliviertassinari @michaldudak If it is not built-in, a more compact solution I think it could provide a better DX and more adoption of this feature overall.

@Nic-S
Copy link

Nic-S commented Sep 4, 2023

@marcpachecog having it built-in, with the ability to disable it (like datagrid) would be optimal for dx. if that is not possible, I agree with you, that a more compact solution could increase dx.

@marcpachecog
Copy link
Author

marcpachecog commented Sep 20, 2023

Other libraries like headlessui are going towards this direction: tailwindlabs/headlessui#2740

@oliviertassinari oliviertassinari changed the title [Base UI][Autocomplete] Add built-in virtualization and infinite scroll [base-ui][Autocomplete] Add built-in virtualization and infinite scroll Apr 18, 2024
@oliviertassinari oliviertassinari changed the title [base-ui][Autocomplete] Add built-in virtualization and infinite scroll [base-ui][Autocomplete] Virtualization/infinite scroll support Apr 18, 2024
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! new feature New feature or request performance
Projects
None yet
Development

No branches or pull requests

8 participants