We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1ac08b8 commit ca85933Copy full SHA for ca85933
1 file changed
src/ReactCodeInput.js
@@ -110,21 +110,20 @@ class ReactCodeInput extends Component {
110
const input = this.state.input.slice();
111
112
if (value.length > 1) {
113
- value.split('').map((chart, i) => {
+ value.split('').forEach((char, i) => {
114
if (Number(e.target.dataset.id) + i < this.props.fields) {
115
- input[Number(e.target.dataset.id) + i] = chart;
+ input[Number(e.target.dataset.id) + i] = char;
116
}
117
return false;
118
});
119
} else {
120
input[Number(e.target.dataset.id)] = value;
121
122
123
- input.map((s, i) => {
+ input.forEach((s, i) => {
124
if (this.textInput[i]) {
125
this.textInput[i].value = s;
126
127
- return false;
128
129
130
const newTarget = this.textInput[e.target.dataset.id < input.length
0 commit comments