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

add 'onBlur' prop #44

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

EddM
Copy link

@EddM EddM commented May 2, 2017

Another PR (#40) introduced an onFocus prop, which was cool, but it would be helpful if we could handle blur too!

@njj
Copy link

njj commented Sep 19, 2017

I could definitely use this too!

Copy link
Collaborator

@michaelbrewerdavis michaelbrewerdavis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice addition

* Signature:
*
* ```js
* function(userInput){}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These would not be userInput, but the focus/blur events.

Copy link

@yashafromrussia yashafromrussia Oct 6, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  handleInputFocus: function() {
    this.props.onFocus();
    this.maybeShowList();
  },

This is not receiving or passing the focus event. I'm using onBlur to do error handling. So it is required for the event to be passed into this.props.onBlur(). To keep it consistent, the onFocus code should probably be something like the following?

  handleInputFocus: function(event) {
    this.props.onFocus(event);
    this.maybeShowList();
  },

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.

4 participants