material-ui
material-ui copied to clipboard
Button on documentation page refreshes the page
Duplicates
- [X] I have searched the existing issues
Latest version
- [X] I have tested the latest version
Current behavior 😯
On https://mui.com/material-ui/react-text-field/ the search icon button right under:
Customization does not stop at CSS. You can use composition to build custom components and give your app a unique feel. Below is an example using the InputBase component, inspired by Google Maps.
Refreshes the page when clicked.
Expected behavior 🤔
Button to have e.preventDefault()
or something
Steps to reproduce 🕹
No response
Context 🔦
No response
Your environment 🌎
No response
@ritwaldev
The fix was actually simple, the type of IconButton was submit
and when you click on those submit
typed button, the page refreshes.
Just changed the type from submit
to button
fixed the problem.