Skip to content

Commit 2768b44

Browse files
Binu42apollonian
authored andcommitted
disable clear button when otp field is empty
1 parent b06c02a commit 2768b44

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/demo/index.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ class Demo extends Component {
183183
<button
184184
className="btn margin-top--large"
185185
type="button"
186-
disabled={isDisabled}
186+
disabled={isDisabled || this.state.otp.trim() === ""}
187187
onClick={this.clearOtp}
188188
>
189189
Clear

0 commit comments

Comments
 (0)