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

<BooleanInput> - cannot set custom icons #7550

Closed
gartner opened this issue Apr 14, 2022 · 0 comments · Fixed by #7556
Closed

<BooleanInput> - cannot set custom icons #7550

gartner opened this issue Apr 14, 2022 · 0 comments · Fixed by #7556
Labels

Comments

@gartner
Copy link
Contributor

gartner commented Apr 14, 2022

In v3 I had customized to use specific icons/colors, like the manual says it should be done:

`import { BooleanInput } from 'react-admin';
import FavoriteIcon from '@mui/icons-material/Favorite';

<BooleanInput
source="favorite"
options={{
checkedIcon: ,
}}
/>`

It worked as expected in v3.

In v4, it does not work anymore.

Looking at the source of BooleanInput.tsx, it looks like the 'options' is not passed on to the underlying component. And that 'options' is removed by the call to sanitizeInputRestProps() ?

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

Successfully merging a pull request may close this issue.

2 participants