@team-monolith/cds 1.9.7 → 1.9.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -38,30 +38,19 @@ export function InputComponent(props) {
|
|
|
38
38
|
return (_jsx(Input, { size: "small", placeholder: placeholder || "여기에 입력하세요.", value: answerInput, color: "default", fullWidth: true, inputProps: { readOnly: true } }));
|
|
39
39
|
}
|
|
40
40
|
else {
|
|
41
|
-
return (_jsx(Input, { size: "small", placeholder: placeholder || "여기에 입력하세요.", value: answerInput, onChange: (e) =>
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
node.setAnswer(answerInput);
|
|
52
|
-
});
|
|
53
|
-
},
|
|
54
|
-
onKeyPress: (e) => {
|
|
55
|
-
if (e.key === "Enter") {
|
|
56
|
-
editor.update(() => {
|
|
57
|
-
const node = $getNodeByKey(nodeKey);
|
|
58
|
-
if (!$isProblemInputNode(node)) {
|
|
59
|
-
return;
|
|
60
|
-
}
|
|
61
|
-
node.setAnswer(answerInput);
|
|
62
|
-
});
|
|
41
|
+
return (_jsx(Input, { size: "small", placeholder: placeholder || "여기에 입력하세요.", value: answerInput, onChange: (e) => {
|
|
42
|
+
// SoT를 EditorState로 설정하는 경우 한글 입력시 문제가 생김.
|
|
43
|
+
// ex) "나비" 입력시 -> "ㄴ나납ㅂ비"
|
|
44
|
+
// SoT를 내부 State로 관리하고 EditorState를 따로 설정.
|
|
45
|
+
// 문제를 더 파악하고 추후 개선 필요.
|
|
46
|
+
setAnswerInput(e.target.value);
|
|
47
|
+
editor.update(() => {
|
|
48
|
+
const node = $getNodeByKey(nodeKey);
|
|
49
|
+
if (!$isProblemInputNode(node)) {
|
|
50
|
+
return;
|
|
63
51
|
}
|
|
64
|
-
|
|
52
|
+
node.setAnswer(e.target.value);
|
|
53
|
+
});
|
|
65
54
|
}, color: "default", fullWidth: true }));
|
|
66
55
|
}
|
|
67
56
|
}
|