dx: added #files-dropper to better recognize dom elements
Massimo Melina committed
Jan 14, 2024 at 15:26 UTC
0e58db0ddecccadb16f5c3c8046f05f0865d2dbe
1 file changed
+7
-4
frontend/src/BrowseFiles.ts
+7
-4
@@ -23,10 +23,13 @@ export function BrowseFiles() {
23
useFetchList()
24
const { error } = useSnapState()
25
const { props, tile_size=0 } = useSnapState()
26
- const propsDropFiles = useMemo(() => acceptDropFiles(files =>
27
- props?.can_upload ? enqueue(files.map(file => ({ file })))
28
- : alertDialog(t("Upload not available"), 'warning') ),
29
- [props])
26
+ const propsDropFiles = useMemo(() => ({
27
+ id: 'files-dropper',
28
+ ...acceptDropFiles(files =>
29
+ props?.can_upload ? enqueue(files.map(file => ({ file })))
30
+ : alertDialog(t("Upload not available"), 'warning')
31
+ ),
32
+ }), [props])
33
if (!useAuthorized())
34
return h(CustomCode, { name: 'unauthorized',
35
ifEmpty: () => h('h1', {