From 669b4c481fd168313613b89b7aca01cc99345e1f Mon Sep 17 00:00:00 2001 From: Anh Luong Date: Wed, 9 Aug 2017 12:31:48 -0700 Subject: [PATCH] Add disabled state to input and flag dropdown --- src/index.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/index.js b/src/index.js index 596e118..6d75702 100644 --- a/src/index.js +++ b/src/index.js @@ -373,7 +373,7 @@ class ReactPhoneInput extends React.Component { } handleKeydown(event) { - if(!this.state.showDropDown) { + if(!this.state.showDropDown || this.props.disabled) { return; } @@ -504,6 +504,7 @@ class ReactPhoneInput extends React.Component { ref="numberInput" type="tel" className={inputClasses} + disabled={this.props.disabled} />