fix chrome issue: selecting the same file does not work properly
This commit is contained in:
@@ -42,6 +42,7 @@
|
|||||||
let formErrors: Record<string, any> | null = $state(null);
|
let formErrors: Record<string, any> | null = $state(null);
|
||||||
let etag: string | null = $state(null);
|
let etag: string | null = $state(null);
|
||||||
let files: FileList | null = $state(null);
|
let files: FileList | null = $state(null);
|
||||||
|
let fileInput = $state(null);
|
||||||
|
|
||||||
// Model Variablen für Upload
|
// Model Variablen für Upload
|
||||||
let openUL = $state(false);
|
let openUL = $state(false);
|
||||||
@@ -102,6 +103,7 @@
|
|||||||
openUL = false;
|
openUL = false;
|
||||||
name = '';
|
name = '';
|
||||||
files = null;
|
files = null;
|
||||||
|
fileInput.value = "";
|
||||||
await invalidateAll();
|
await invalidateAll();
|
||||||
crimesList = data.crimesList;
|
crimesList = data.crimesList;
|
||||||
}
|
}
|
||||||
@@ -449,7 +451,7 @@ Mit freundlichen Grüßen,
|
|||||||
class="relative cursor-pointer rounded-md bg-white font-semibold text-indigo-600 focus-within:outline-none focus-within:ring-2 focus-within:ring-indigo-600 focus-within:ring-offset-2 hover:text-indigo-500"
|
class="relative cursor-pointer rounded-md bg-white font-semibold text-indigo-600 focus-within:outline-none focus-within:ring-2 focus-within:ring-indigo-600 focus-within:ring-offset-2 hover:text-indigo-500"
|
||||||
>
|
>
|
||||||
<span>Wähle eine Datei aus</span>
|
<span>Wähle eine Datei aus</span>
|
||||||
<input id="file" bind:files name="file" type="file" class="sr-only" />
|
<input id="file" bind:this={fileInput} bind:files name="file" type="file" class="sr-only" />
|
||||||
</label>
|
</label>
|
||||||
<p class="pl-1">oder ziehe sie ins Feld</p>
|
<p class="pl-1">oder ziehe sie ins Feld</p>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user