Skip to content

fix(masked-input): remove implicit maxLength setting #1142

Merged
merged 1 commit into from
Apr 29, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/masked-input/__snapshots__/masked-input.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

exports[`masked-input should render without problems 1`] = `
<input
maxLength={19}
onBeforeInput={[Function]}
onChange={[Function]}
onInput={[Function]}
Expand Down
2 changes: 0 additions & 2 deletions src/masked-input/masked-input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,6 @@ class MaskedInput extends React.PureComponent<MaskedInputProps> {

render() {
const props = { ...this.props };
const length = props.maxLength === undefined ? this.mask.length : props.maxLength;

delete props.mask;
delete props.formatCharacters;
Expand All @@ -171,7 +170,6 @@ class MaskedInput extends React.PureComponent<MaskedInputProps> {
ref={ (ref) => {
this.input = ref;
} }
maxLength={ length }
value={ this.value }
onBeforeInput={ this.handleBeforeInput }
onInput={ this.handleInput }
Expand Down