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

A suggestion to have a loading state on the button #9514

Closed
ogustavo-pereira opened this issue Dec 12, 2023 · 3 comments
Closed

A suggestion to have a loading state on the button #9514

ogustavo-pereira opened this issue Dec 12, 2023 · 3 comments
Labels
RFC Request For Comments

Comments

@ogustavo-pereira
Copy link
Contributor

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?

@slax57 slax57 added the RFC Request For Comments label Dec 12, 2023
@slax57
Copy link
Contributor

slax57 commented Dec 12, 2023

Thank you for your suggestion.
Let's wait for feedback from the community to see if this is something that other people would want too 🙂

@fzaninotto
Copy link
Member

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.

@fzaninotto
Copy link
Member

No news for some time, closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RFC Request For Comments
Projects
None yet
Development

No branches or pull requests

3 participants