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

BaseInput throws error for textfield for onFocus and onBlur #7

Open
pratikt-cuelogic opened this issue Feb 21, 2018 · 3 comments
Open
Assignees
Labels

Comments

@pratikt-cuelogic
Copy link

pratikt-cuelogic commented Feb 21, 2018

Description

Tried to run sample locally (reference https://github.com/nilportugues/react-jsonschema-form-semantic-ui#usage), but it throws error while editing field value in terms of onFocus and onBlur for BaseInput.

Steps to Reproduce

  1. installed package locally (reference: Package is no where to be found #5 (comment))
  2. tried the example: https://github.com/nilportugues/react-jsonschema-form-semantic-ui#usage
  3. seen error on console
    00001

Let me know if Im missing anything here... usage or any additional dependency required?

@ahmadmicro
Copy link

I am getting the same error and text input is very sluggish.

@ahmadmicro
Copy link

Solution, replace the code section with:

 onBlur: onBlur && function (event, data) {
      return onBlur(inputProps.id, data!==undefined?data.value:'');
 },
 onFocus: onFocus && function (event, data) {
      return onFocus(inputProps.id, data!==undefined?data.value:'');
 }

@nilportugues
Copy link
Owner

Thanks for reporting and providing a fix :)

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

No branches or pull requests

3 participants