-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
A suggestion to have a loading state on the button #9514
Comments
Thank you for your suggestion. |
I thin we should rely on MUI for that. Material-ui has a Loading Button, but it's in their lab... https://mui.com/material-ui/react-button/#loading-button I suggest you ask MUI to move their LoadingButton to stable so we can consider using it. But they seem to be waiting for their v6 for that. |
No news for some time, closing. |
Is your feature request related to a problem? Please describe.
When we use the button component and this button has a loading linked to it, we always have to create conditionals on top of the icon and even the disabled one. I think that as an abstraction of the material-ui, the react-admin button component could provide a difference, such as manipulating a loading prop, where I call a boolean and it automatically modifies the icon and changes it to disabled.
Describe the solution you'd like
Today, to get around this point, we created a component that abstracts this loading logic but that could easily be handled within the button component.
https://marmelab.com/react-admin/Buttons.html#button
Additional context
Today the button component is very simplistic, which is actually positive, however wouldn't it be better to have a loading property?
The text was updated successfully, but these errors were encountered: