Skip to content
This repository was archived by the owner on Jun 3, 2025. It is now read-only.

Commit 201484f

Browse files
author
Olivier Nguyen
committed
fix(Input) fix bug showing zero in input when no limit char
1 parent d39c9ac commit 201484f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/components/Input/index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,9 @@ class Input extends Component {
135135
const { enableHistoryInput, characterLimit } = this.props
136136
const { value } = this.state
137137

138-
const showLimitCharacter =
139-
characterLimit && characterLimit - value.length <= NUMBER_BEFORE_LIMIT
138+
const showLimitCharacter = characterLimit
139+
? characterLimit - value.length <= NUMBER_BEFORE_LIMIT
140+
: null;
140141

141142
return (
142143
<div

0 commit comments

Comments
 (0)