This repository was archived by the owner on Jun 23, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +11
-9
lines changed
Expand file tree Collapse file tree 3 files changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -622,17 +622,18 @@ var NiceInputPassword = function (_React$Component) {
622622 function handleChange ( event ) {
623623 var target = event . target ;
624624
625+
626+ this . setState ( {
627+ levels : this . handleValidateAndGetLevels ( target . value )
628+ } ) ;
629+
625630 this . props . onChange ( {
626631 name : this . props . name ,
627632 value : target . value ,
628633 isValid : this . state . levels . filter ( function ( level ) {
629634 return level . isValid ;
630635 } ) . length === this . state . levels . length
631636 } ) ;
632-
633- this . setState ( {
634- levels : this . handleValidateAndGetLevels ( target . value )
635- } ) ;
636637 }
637638
638639 return handleChange ;
Original file line number Diff line number Diff line change 11{
22 "name" : " react-nice-input-password" ,
3- "version" : " 2.1.3 " ,
3+ "version" : " 2.1.4 " ,
44 "description" : " React input password component" ,
55 "main" : " dist/react-nice-input-password.js" ,
66 "style" : " dist/react-nice-input-password.css" ,
Original file line number Diff line number Diff line change @@ -75,15 +75,16 @@ class NiceInputPassword extends React.Component {
7575
7676 handleChange ( event ) {
7777 const { target } = event ;
78+
79+ this . setState ( {
80+ levels : this . handleValidateAndGetLevels ( target . value ) ,
81+ } ) ;
82+
7883 this . props . onChange ( {
7984 name : this . props . name ,
8085 value : target . value ,
8186 isValid : this . state . levels . filter ( level => level . isValid ) . length === this . state . levels . length ,
8287 } ) ;
83-
84- this . setState ( {
85- levels : this . handleValidateAndGetLevels ( target . value ) ,
86- } ) ;
8788 }
8889
8990 render ( ) {
You can’t perform that action at this time.
0 commit comments