grncdr / react-async-input

Inputs that behave properly with async set{State,Props} calls
5 stars 2 forks source link

Uncaught TypeError: Cannot read property 'ref' of undefined #1

Closed ericclemmons closed 10 years ago

ericclemmons commented 10 years ago

I replaced my normal input with your async input and hit an error:

With React v0.11.x:

var input = require('react-async-input`);

...
  function renderField(field) {
    return (
      <input
        className="form field text phone"
        key={field.name}
        name={field.name}
        onChange={this.handleChange}
        placeholder={field.placeholder}
        type="tel"
        value={this.state.form.data[field.name] || ''} />
    );
  }

I even tried doing it as <AsyncInput ... />, assuming maybe input wasn't being overridden, but the same issue occurs.

Browser throws:

Uncaught TypeError: Cannot read property 'ref' of undefined (ReactComponents.js:371)

grncdr commented 10 years ago

Hi Eric,

I've added a warning to the README about this lib being unmaintained and the reasons why. If you'd like to take it over that would be fine with me, but at the moment I'm not doing anything with React so I'm unlikely to get around to updating it myself. Sorry if this lib got your hopes up :cry: