v14 changes
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -34,7 +34,7 @@ export default class PartialMatchFilter extends Component {
|
||||
this.state.text = model ? model.value : '';
|
||||
}
|
||||
|
||||
afterGuiAttached(params) {
|
||||
componentDidMount() {
|
||||
this.focus();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user