react-admin icon indicating copy to clipboard operation
react-admin copied to clipboard

A suggestion to have a loading state on the button

Open ogustavo-pereira opened this issue 6 months ago • 2 comments

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?

ogustavo-pereira avatar Dec 12 '23 13:12 ogustavo-pereira