mirror of
				https://github.com/immich-app/immich.git
				synced 2025-10-26 08:24:27 -04:00 
			
		
		
		
	fix(web): confirm button is disabled if two dialogs are shown subsequently (#10440)
This commit is contained in:
		
							parent
							
								
									1b67ea2d91
								
							
						
					
					
						commit
						e8994d9ffd
					
				| @ -16,10 +16,7 @@ | |||||||
|   export let onCancel: () => void; |   export let onCancel: () => void; | ||||||
|   export let onConfirm: () => void; |   export let onConfirm: () => void; | ||||||
| 
 | 
 | ||||||
|   let isConfirmButtonDisabled = false; |  | ||||||
| 
 |  | ||||||
|   const handleConfirm = () => { |   const handleConfirm = () => { | ||||||
|     isConfirmButtonDisabled = true; |  | ||||||
|     onConfirm(); |     onConfirm(); | ||||||
|   }; |   }; | ||||||
| </script> | </script> | ||||||
| @ -37,7 +34,7 @@ | |||||||
|         {cancelText} |         {cancelText} | ||||||
|       </Button> |       </Button> | ||||||
|     {/if} |     {/if} | ||||||
|     <Button color={confirmColor} fullwidth on:click={handleConfirm} disabled={disabled || isConfirmButtonDisabled}> |     <Button color={confirmColor} fullwidth on:click={handleConfirm} {disabled}> | ||||||
|       {confirmText} |       {confirmText} | ||||||
|     </Button> |     </Button> | ||||||
|   </svelte:fragment> |   </svelte:fragment> | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user