Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

Rev 453 | Rev 455 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 453 Rev 454
Línea 13... Línea 13...
13
     /**
13
     /**
14
     * componentDidMount
14
     * componentDidMount
15
     */
15
     */
16
      useEffect(() => {
16
      useEffect(() => {
17
        setInput(question.answer);
17
        setInput(question.answer);
-
 
18
        console.log(question.answer);
18
    }, [question]);
19
    }, [question]);
Línea 19... Línea 20...
19
 
20
 
20
    return (
21
    return (
21
        <div className="col-md-12 col-sm-12 col-xs-12 np-padding">
22
        <div className="col-md-12 col-sm-12 col-xs-12 np-padding">
Línea 33... Línea 34...
33
                            className="form-control"
34
                            className="form-control"
34
                            rows="5"
35
                            rows="5"
35
                            value={input}
36
                            value={input}
36
                            maxLength={question.maxlength}
37
                            maxLength={question.maxlength}
37
                            name={question.slug_question}
38
                            name={question.slug_question}
38
                            onChange={e =>
39
                            onChange={e =>{
-
 
40
                                setInput(e.target.value);
-
 
41
                                question.answer = e.target.value; 
39
                                handleAnswer(question.slug_section, question.slug_question, e.target.value)
42
                                //handleAnswer(question.slug_section, question.slug_question, e.target.value)
40
                            }
43
                            }}
41
                        />
44
                        />
42
                    ) : (
45
                    ) : (
43
                        <input
46
                        <input
44
                            type="text"
47
                            type="text"
45
                            className="form-control"
48
                            className="form-control"