File tree Expand file tree Collapse file tree 4 files changed +10
-7
lines changed
Expand file tree Collapse file tree 4 files changed +10
-7
lines changed Original file line number Diff line number Diff line change 181181 false-value ="false ">
182182 < label for ="disabled "> Disabled</ label >
183183 </ div >
184+ < div class ="form-input toggle ">
185+ < input type ="checkbox " id ="autoClose " v-model ="paybuttonProps.autoClose " true-value ="true "
186+ false-value ="false ">
187+ < label for ="autoClose "> Auto Close</ label >
188+ </ div >
184189 </ div >
185190 </ div >
186191 < div style ="display: flex; justify-content: right; position: relative; ">
213218 :on-transaction ="myTransactionFuction "
214219 :disable-altpayment ="paybuttonProps.disableAltpayment "
215220 :transaction-text ="paybuttonProps.transactionText "
221+ :auto-close ="paybuttonProps.autoClose "
216222 :op-return ="paybuttonProps.opReturn ">
217223 </ div >
218224 </ div >
247253 opReturn :undefined ,
248254 transactiontext : '' ,
249255 onSuccess : mySuccessFuction ,
250- onTransaction : myTransactionFuction
256+ onTransaction : myTransactionFuction ,
257+ autoClose : true
251258 } ) ;
252259 const paybuttonType = ref ( "paybutton" ) ;
253260 const updateProps = ( ) => {
Original file line number Diff line number Diff line change @@ -367,7 +367,7 @@ const payButtonDefaultProps: PayButtonProps = {
367367 disableEnforceFocus : false ,
368368 disabled : false ,
369369 editable : false ,
370- autoClose : true ,
370+ autoClose : false ,
371371} ;
372372
373373PayButton . defaultProps = payButtonDefaultProps ;
Original file line number Diff line number Diff line change @@ -140,8 +140,7 @@ export const PaymentDialog = (
140140 setSuccess ( true ) ;
141141 onSuccess ?.( transaction ) ;
142142 setTimeout ( ( ) => {
143- setSuccess ( false ) ;
144- if ( autoClose === true ) {
143+ if ( isPropsTrue ( autoClose ) ) {
145144 handleWidgetClose ( ) ;
146145 }
147146 } , 3000 ) ;
Original file line number Diff line number Diff line change @@ -201,9 +201,6 @@ export const WidgetContainer: React.FunctionComponent<WidgetContainerProps> =
201201 ) ;
202202 setSuccess ( true ) ;
203203 onSuccess ?.( transaction ) ;
204- setTimeout ( ( ) => {
205- setSuccess ( false ) ;
206- } , 3000 ) ;
207204 } else {
208205 onTransaction ?.( transaction ) ;
209206 if ( transactionText ) {
You can’t perform that action at this time.
0 commit comments