v14 changes

This commit is contained in:
Sean Landsman
2017-10-31 10:16:42 +00:00
parent a982e0f2a7
commit f035ee7a9d
4 changed files with 22 additions and 21 deletions

View File

@@ -1,4 +1,5 @@
import React, {PropTypes} from 'react'
import React from 'react'
import * as PropTypes from 'prop-types';
import {Route, Link} from 'react-router-dom'
// for bootstrap li active functionality

View File

@@ -32,11 +32,12 @@ export default class MoodEditor extends Component {
}
focus() {
setTimeout(() => {
this.refs.input.focus();
this.refs.input.setSelectionRange(this.state.value.length, this.state.value.length);
})
if (!this.cancelBeforeStart) {
setTimeout(() => {
this.refs.input.focus();
this.refs.input.setSelectionRange(this.state.value.length, this.state.value.length);
})
}
}
getValue() {

View File

@@ -34,7 +34,7 @@ export default class PartialMatchFilter extends Component {
this.state.text = model ? model.value : '';
}
afterGuiAttached(params) {
componentDidMount() {
this.focus();
}