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

RadioButtonGroupInput do not call its onChange prop #4122

Closed
Kmaschta opened this issue Dec 6, 2019 · 0 comments · Fixed by #4123
Closed

RadioButtonGroupInput do not call its onChange prop #4122

Kmaschta opened this issue Dec 6, 2019 · 0 comments · Fixed by #4123
Labels

Comments

@Kmaschta
Copy link
Contributor

Kmaschta commented Dec 6, 2019

What you were expecting:
When using a component, and its value change, I expect its prop onChange function called

What happened instead:
The onChange function passed to a RadioButtonGroupInput isn't called

Steps to reproduce:

  1. Go the the following sandbox https://codesandbox.io/s/winter-sun-oq5tt
  2. Edit any post
  3. Select any Notifications recipients, there is no warning triggered by the onChange prop

Related code:

<RadioButtonGroupInput
    source="notifications"
    choices={[
        { id: '12', name: "Ray Hakt" },
        { id: '31', name: "Ann Gullar" },
        { id: '42', name: "Sean Phonee" }
    ]}
    onChange={values => console.warn('TRIGGERED', values)} // never caled
/>

Environment

  • React-admin version: latest
  • Last version that did not exhibit the issue (if applicable):
  • React version:
  • Browser:
  • Stack trace (in case of a JS error):
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.

1 participant