mirror of
https://github.com/vale981/accounts-ui
synced 2025-03-04 17:31:41 -05:00
Merge pull request #1 from shoetten/master
Fix "Uncaught Invariant Violation: getNodeFromInstance [...]" error,
This commit is contained in:
commit
be09f37fcc
1 changed files with 0 additions and 7 deletions
|
@ -13,16 +13,9 @@ export class Field extends React.Component {
|
|||
triggerUpdate() {
|
||||
// Trigger an onChange on inital load, to support browser prefilled values.
|
||||
const { onChange } = this.props;
|
||||
let node = ReactDOM.findDOMNode(this);
|
||||
if (this.input) {
|
||||
onChange({ target: { value: this.input.value } });
|
||||
}
|
||||
// Backward compat.
|
||||
else if (node) {
|
||||
let value = node.getElementsByTagName('input')[0].value;
|
||||
// Match the data format of a typical onChange event.
|
||||
onChange({ target: { value: value } });
|
||||
}
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
|
|
Loading…
Add table
Reference in a new issue