File tree Expand file tree Collapse file tree 4 files changed +17
-25
lines changed
Expand file tree Collapse file tree 4 files changed +17
-25
lines changed Original file line number Diff line number Diff line change 1+ v3.0.0-alpha.1 - Mon 23 Nov 2020 22:25 ET
2+ ---------------------------------------
3+ - Add isolated prop [ (#179 )] ( https://github.com/dozoisch/react-google-recaptcha/issues/179 )
4+ - Update dependencies 1 [ (#187 )] ( https://github.com/dozoisch/react-google-recaptcha/issues/187 )
5+ - Update dependencies 2 [ (#194 )] ( https://github.com/dozoisch/react-google-recaptcha/issues/194 )
6+ - Remove Timeout Removal [ (#196 )] ( https://github.com/dozoisch/react-google-recaptcha/issues/196 )
7+
8+
9+
110v2.1.0 - Fri 5 Jun 2020 22:05 PST
211---------------------------------------
312- Add promise based Execution [ (#163 )] ( https://github.com/dozoisch/react-google-recaptcha/issues/163 )
Original file line number Diff line number Diff line change 11{
22 "name" : " react-google-recaptcha" ,
3- "version" : " 2.1.0 " ,
3+ "version" : " 3.0.0-alpha.1 " ,
44 "description" : " React Component Wrapper for Google reCAPTCHA" ,
55 "main" : " lib/index.js" ,
66 "module" : " lib/esm/index.js" ,
Original file line number Diff line number Diff line change @@ -48,6 +48,12 @@ export default class ReCAPTCHA extends React.Component {
4848 }
4949 }
5050
51+ forceReset ( ) {
52+ if ( this . props . grecaptcha ) {
53+ this . props . grecaptcha . reset ( ) ;
54+ }
55+ }
56+
5157 handleExpired ( ) {
5258 if ( this . props . onExpired ) {
5359 this . props . onExpired ( ) ;
@@ -111,29 +117,6 @@ export default class ReCAPTCHA extends React.Component {
111117 this . explicitRender ( ) ;
112118 }
113119
114- componentWillUnmount ( ) {
115- if ( this . _widgetId !== undefined ) {
116- this . delayOfCaptchaIframeRemoving ( ) ;
117- this . reset ( ) ;
118- }
119- }
120-
121- delayOfCaptchaIframeRemoving ( ) {
122- const temporaryNode = document . createElement ( "div" ) ;
123- document . body . appendChild ( temporaryNode ) ;
124- temporaryNode . style . display = "none" ;
125-
126- // move of the recaptcha to a temporary node
127- while ( this . captcha . firstChild ) {
128- temporaryNode . appendChild ( this . captcha . firstChild ) ;
129- }
130-
131- // delete the temporary node after reset will be done
132- setTimeout ( ( ) => {
133- document . body . removeChild ( temporaryNode ) ;
134- } , 5000 ) ;
135- }
136-
137120 handleRecaptchaRef ( elem ) {
138121 this . captcha = elem ;
139122 }
You can’t perform that action at this time.
0 commit comments