React-admin: LoadingIndicator does not get class overrides

Created on 18 Sep 2020  路  3Comments  路  Source: marmelab/react-admin

What you were expecting:
Can apply custom theme to LoadingIndicator component

What happened instead:
LoadingIndicator is default color. Does not pass styles to RefreshIconButton

It does pass the styles to the CircularProgress component while isLoading is true.

Steps to reproduce:

import { LoadingIndicator } from 'react-admin';

theme => ({
  indicator: {
    color: '#F00'
  }
})

<LoadingIndicator className={classes.indicator} />

Environment

  • React-admin version: 3.8.4
  • Last version that did not exhibit the issue (if applicable):
  • React version:
  • Browser:
  • Stack trace (in case of a JS error):
enhancement good first issue

All 3 comments

Thanks for reporting. Indeed only the CircularProgress is passed a className.

This feature will be part of the next release. You'll have to overide the classes passed to the LoadingIndicator using the key loadedIcon.

just wrapp it inside a div and pass the styles you want to that div, or inside the LoadingIndicator.d.ts file add this line "const style: PropTypes.Requireable; " in the namespace prototype and you u ll be fine to go

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pixelscripter picture pixelscripter  路  3Comments

aserrallerios picture aserrallerios  路  3Comments

mbj36 picture mbj36  路  3Comments

fzaninotto picture fzaninotto  路  3Comments

kopax picture kopax  路  3Comments