Skip to content

Commit 3403072

Browse files
committed
Remove maxLength so filtered pasted values aren’t truncated
when using maxLength, if user has "623 293" and pastes it into an input with fields={6}, the last digit (“3”) won’t be pasted because the max length on the focused input is 6 digits
1 parent b65e90e commit 3403072

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

src/ReactCodeInput.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,6 @@ class ReactCodeInput extends Component {
267267
type={type === 'number' ? 'text' : type}
268268
min={0}
269269
max={9}
270-
maxLength={input.length === i + 1 ? 1 : input.length}
271270
style={styles.input}
272271
autoComplete={autoComplete}
273272
onFocus={(e) => e.target.select(e)}

0 commit comments

Comments
 (0)