|
@@ -161,7 +161,7 @@ class RadioInpDrop extends Component{
|
|
|
}else{
|
|
|
lengths = mainText.length + val.length;
|
|
|
}
|
|
|
- console.log("val:",val,"preVal:",preText,"mainText:",mainText,"lengths:",lengths,this.state.texts)
|
|
|
+ //console.log("val:",val,"preVal:",preText,"mainText:",mainText,"lengths:",lengths,this.state.texts)
|
|
|
if(lengths >= config.limited){
|
|
|
Notify.info(config.limitText);
|
|
|
this.setState({
|
|
@@ -225,6 +225,7 @@ class RadioInpDrop extends Component{
|
|
|
class InputComp extends Component{
|
|
|
constructor(props){
|
|
|
super(props);
|
|
|
+ this.$inp = React.createRef();
|
|
|
this.handleBlur = this.handleBlur.bind(this);
|
|
|
}
|
|
|
handleBlur(e){
|
|
@@ -234,9 +235,19 @@ class InputComp extends Component{
|
|
|
e.target.innerText = '';
|
|
|
handleInp(index,text);
|
|
|
}
|
|
|
+ componentWillReceiveProps(next){
|
|
|
+ if(next.over&&!this.props.over){
|
|
|
+ const inp = this.$inp.current;
|
|
|
+ const value = this.props.value;
|
|
|
+ setTimeout(function(){
|
|
|
+ inp.innerText = value;
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
render(){
|
|
|
const {editable,value} = this.props;
|
|
|
return editable?<span contentEditable={true}
|
|
|
+ ref={this.$inp}
|
|
|
className={style['inner-inp']}
|
|
|
onClick={(e)=>{e.stopPropagation()}}
|
|
|
onFocus={(e)=>{e.stopPropagation()}}
|