-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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
[Paper] Adding PaperComponent property makes the Autocomplete scroll to top on change #31073
Comments
I have the same problem, are there any updates? |
I am also experiencing this behaviour, an update/workaround would be greatly appreciated. |
Yes it's a bug that passing a custom However, if you just want to have props applied to See: https://stackblitz.com/edit/react-vr2zm1-zkbquf?file=demo.js This alternative solution fixes the issue. |
@ZeeshanTamboli nice to have this workaround, but it's not enough unfortunately. |
I deep dived into it. This issue happens because the custom paper component is defined inline within the You can fix the issue by memoizing the Paper component or defining it outside the main component. See the following Stackblitz for the second option: https://stackblitz.com/edit/react-vr2zm1-xhhkth?file=demo.js I'm closing this issue since there is no action for us. |
This issue is still happening, are there any updates? |
How to add custom prop to the CustomPaperComponent so that it doesn't auto scrolls to the top? |
@nimishkr28 You can provide those props to the |
Duplicates
Latest version
Current behavior 😯
If I have set a custom PaperComponent and I scroll down the list and select an item, I am scrolled back to top automatically.
Expected behavior 🤔
If I have set a custom PaperComponent and I scroll down the list and select an item, I should stay scrolled down to that item.
Steps to reproduce 🕹
Steps:
Result: You get scrolled to the top of the list.
Context 🔦
If I want to use custom Paper Component to set custom class name or elevation, I get degraded experience. I am currently using a workaround to set the class name through the classes property.
Your environment 🌎
No response
The text was updated successfully, but these errors were encountered: