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

[Autocomplete] scroll is getting scrolled to the top when using filterSelectedOptions #30948

Closed
2 tasks done
Binu42 opened this issue Feb 6, 2022 · 4 comments
Closed
2 tasks done
Labels
bug 🐛 Something doesn't work component: autocomplete This is the name of the generic UI component, not the React module! duplicate This issue or pull request already exists

Comments

@Binu42
Copy link

Binu42 commented Feb 6, 2022

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Current behavior 😯

when we are using disableCloseOnSelect, filterSelectedOptions and multiple props in AutoComplete component. then by scrolling down select an option after selection scroll is going back to the top of the options.

MUI

Expected behavior 🤔

It's should not get scrolled to the top of the options. otherwise, can we control this scroll behavior props-driven?

Steps to reproduce 🕹

Steps:

  1. Please visit https://codesandbox.io/embed/fixedtags-material-demo-forked-8piz2?fontsize=14&hidenavigation=1&theme=dark
  2. In the first input filterSelectedOptions is used. if we select any option by scrolling down, after selection scroll we go back to the top.
  3. In the second input filterSelectedOptions is not used. It's working as expected.

Context 🔦

No response

Your environment 🌎

`npx @mui/envinfo`
  System:
    OS: macOS 12.2
  Binaries:
    Node: 16.13.2 - ~/.nvm/versions/node/v16.13.2/bin/node
    Yarn: 1.22.10 - /usr/local/bin/yarn
    npm: 8.4.0 - ~/.nvm/versions/node/v16.13.2/bin/npm
  Browsers:
    Chrome: 98.0.4758.80
    Edge: Not Found
    Firefox: 96.0.2
    Safari: 15.3
@Binu42 Binu42 added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Feb 6, 2022
@Binu42 Binu42 changed the title Autocomplete with filteredSelectedOptions is getting scrolled to top [Autocomplete] scroll is getting scrolled to the top when using filterSelectedOptions Feb 6, 2022
@michaldudak
Copy link
Member

Right, I can see it can be annoying. It's clearly a bug.

@michaldudak michaldudak added component: autocomplete This is the name of the generic UI component, not the React module! bug 🐛 Something doesn't work and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Feb 11, 2022
@Binu42
Copy link
Author

Binu42 commented Feb 12, 2022

I'm working on this.

@tondi
Copy link

tondi commented Mar 11, 2022

Same issue here.

@michaldudak
Copy link
Member

I've found another issue describing the same problem: #29508. I'm closing this one.

@michaldudak michaldudak closed this as not planned Won't fix, can't repro, duplicate, stale Oct 28, 2022
@michaldudak michaldudak added the duplicate This issue or pull request already exists label Oct 28, 2022
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: 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