Material-ui: [TextField] onFocus and onBlur events are undefined

Created on 5 Jun 2017  路  5Comments  路  Source: mui-org/material-ui

TextField onFocus and onBlur handler events are undefined in alpha16.

bug 馃悰

Most helpful comment

This seems to be fixed already in "@material-ui/core": "^1.5.1",

All 5 comments

It's working fine on my end, I believe you are on alpha15. I'm closing.

I checked and I'm on alpha16. React 15.5.4

Oh, could you provide a reproduction example? Thanks.

Sure

constructor(props) {
  super(props)
  this.test = this.test.bind(this)
}

test(event) {
  console.log(event)
}

render() {
  return (
    <form>
      <TextField onBlur={this.test} />
      <input type="text" onBlur={this.test} />
    </form>
  )
}

The React input works as expected but TextField test() event is undefined.
By the way TextField onChange works as expected.

This seems to be fixed already in "@material-ui/core": "^1.5.1",

Was this page helpful?
0 / 5 - 0 ratings

Related issues

anthony-dandrea picture anthony-dandrea  路  3Comments

ryanflorence picture ryanflorence  路  3Comments

zabojad picture zabojad  路  3Comments

rbozan picture rbozan  路  3Comments

ghost picture ghost  路  3Comments