Ver código fonte

fix: disable file item click during upload

Timothy J. Baek 9 meses atrás
pai
commit
42d048741c

+ 8 - 0
src/lib/components/workspace/Knowledge/Collection/Files.svelte

@@ -23,9 +23,17 @@
 				loading={file.status === 'uploading'}
 				dismissible
 				on:click={() => {
+					if (file.status === 'uploading') {
+						return;
+					}
+
 					dispatch('click', file.id);
 				}}
 				on:dismiss={() => {
+					if (file.status === 'uploading') {
+						return;
+					}
+
 					dispatch('delete', file.id);
 				}}
 			/>