mirror of
				https://github.com/open-webui/open-webui
				synced 2025-06-26 18:26:48 +00:00 
			
		
		
		
	fix: confirm dialog input reset on show
This commit is contained in:
		
							parent
							
								
									e866fba27c
								
							
						
					
					
						commit
						fb26be7dd6
					
				@ -25,11 +25,19 @@
 | 
			
		||||
 | 
			
		||||
	export let show = false;
 | 
			
		||||
 | 
			
		||||
	$: if (show) {
 | 
			
		||||
		init();
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	let modalElement = null;
 | 
			
		||||
	let mounted = false;
 | 
			
		||||
 | 
			
		||||
	let focusTrap: FocusTrap.FocusTrap | null = null;
 | 
			
		||||
 | 
			
		||||
	const init = () => {
 | 
			
		||||
		inputValue = '';
 | 
			
		||||
	};
 | 
			
		||||
 | 
			
		||||
	const handleKeyDown = (event: KeyboardEvent) => {
 | 
			
		||||
		if (event.key === 'Escape') {
 | 
			
		||||
			console.log('Escape');
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user