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

In autocomplete using renderOptions scroll position getting resets when new options are added #43954

Closed
kalaiy21 opened this issue Oct 1, 2024 · 3 comments
Assignees
Labels
component: autocomplete This is the name of the generic UI component, not the React module! duplicate This issue or pull request already exists

Comments

@kalaiy21
Copy link

kalaiy21 commented Oct 1, 2024

Steps to reproduce

CodesandBox link: https://codesandbox.io/p/sandbox/modest-fire-vh8534

Current behavior

When adding new options when render options prop is present the scroll position gets reset.

Expected behavior

When adding new options when render options prop is present the scroll position should not get reset.

Context

No response

Your environment

No response

Search keywords: In autocomplete using renderOptions scroll position getting resets when new options are added

@kalaiy21 kalaiy21 added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Oct 1, 2024
@DiegoAndai
Copy link
Member

Hey @kalaiy21, thanks for the report. I don't understand the issue's description, can you provide further details?

When adding new options when render options prop is present the scroll position gets reset.

How are you adding new options?

A video of the behavior would be helpful to understand as well.

@DiegoAndai DiegoAndai added status: waiting for author Issue with insufficient information and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Oct 2, 2024
@kalaiy21
Copy link
Author

kalaiy21 commented Oct 6, 2024

Hi @DiegoAndai

I am adding the new options using listboxprops onScroll method when the scroll position reaches bottom.

CodeSandBox Link: https://codesandbox.io/p/sandbox/modest-fire-vh8534
Video Link : https://drive.google.com/file/d/1z6P2xvKLuKgH-cX6G3W0ZTbHlORL0S3y/view?usp=sharing

@github-actions github-actions bot added status: waiting for maintainer These issues haven't been looked at yet by a maintainer and removed status: waiting for author Issue with insufficient information labels Oct 6, 2024
@zannager zannager added the component: autocomplete This is the name of the generic UI component, not the React module! label Oct 7, 2024
@DiegoAndai
Copy link
Member

Thanks for the clarification @kalaiy21, I see the problem now. This is a duplicate of #40250, so I'm closing this one. I recommend adding an upvote (👍🏼) to that issue.

If what you're looking for is virtualization, have you looked into our virtualization example? https://mui.com/material-ui/react-autocomplete/#virtualization

@DiegoAndai DiegoAndai closed this as not planned Won't fix, can't repro, duplicate, stale Oct 8, 2024
@DiegoAndai DiegoAndai added duplicate This issue or pull request already exists and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Oct 8, 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! duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants