akuzko / react-form-material-ui

material-ui input bindings for react-form-base
MIT License
7 stars 2 forks source link

Unexpected failure with simple form initialization #3

Open steowens opened 6 years ago

steowens commented 6 years ago

Why would AutoComplete types be failing when it is not even being used?

Class generating error:

import React from "react";

import Form, { TextField } from 'react-form-material-ui';

class GenerateKeyPair extends Form {

  constructor(props) {
       super(props)

  }
  render() {
    return (
      <div>
        <div><TextField {...this.$('privateKey')} floatingLabelText="Private Key" /></div>
        <div><TextField {...this.$('pubicKey')} floatingLabelText="Public Key" /></div> 
      </div>
    );
  }
}

export default GenerateKeyPair

Error generated:

×
TypeError: Cannot read property 'string' of undefined
./node_modules/react-form-material-ui/lib/inputs/AutoComplete.js
node_modules/react-form-material-ui/lib/inputs/AutoComplete.js:39
  36 | }
  37 | 
  38 | AutoComplete.propTypes = {
> 39 |   value: _react.PropTypes.string,
  40 |   error: _react.PropTypes.string,
  41 |   onChange: _react.PropTypes.func
  42 | };
elodieirdor commented 6 years ago

Same mistake here! Did you find a way to fix it?

ivanthemeh commented 6 years ago

Ever get this fixed?