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

[RFR] Fix undefined issue in asyncValidation for SelectInput #2825

Merged
merged 1 commit into from
Jan 30, 2019
Merged

[RFR] Fix undefined issue in asyncValidation for SelectInput #2825

merged 1 commit into from
Jan 30, 2019

Conversation

erkimii
Copy link
Contributor

@erkimii erkimii commented Jan 29, 2019

Property with undefined value was passed to asyncValidation when onBlur event occured

@erkimii erkimii changed the title [RFR] Fix undefined issue in asyncValidation [RFR] Fix undefined issue in asyncValidation for SelectInputs Jan 29, 2019
@erkimii erkimii changed the title [RFR] Fix undefined issue in asyncValidation for SelectInputs [RFR] Fix undefined issue in asyncValidation for SelectInput Jan 29, 2019
@fzaninotto
Copy link
Member

Sorry, I fail to understand the bug you're solving, can you show some example code, and the error you get?

@erkimii
Copy link
Contributor Author

erkimii commented Jan 30, 2019

@fzaninotto
Steps to reproduce:

  • Have an asyncValidated form with <SelectInput source="a" choices={[ id: 'b', name: 'Only choice' ]} />
  • Change value in the input a
  • Debug data (first argument) passed to asyncValidate method

When validation is called on input change, then data equals { a: 'b' }
When validation is called on input blur, then data equals { a: undefined }

This bug is created by #2203
If you look closely, there is value passed for onBlur in SelectArrayInput but not for SelectInput

@fzaninotto fzaninotto added this to the v2.6.4 milestone Jan 30, 2019
@fzaninotto fzaninotto merged commit 0ee2579 into marmelab:master Jan 30, 2019
@fzaninotto
Copy link
Member

Thanks, then!

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

Successfully merging this pull request may close these issues.

2 participants