From 52bc6940597479a270f1a2d699de4b8de690f979 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonatan=20K=C5=82osko?= Date: Thu, 9 Feb 2023 12:34:46 +0100 Subject: [PATCH] Make file dropzone ids unique (#1699) --- lib/livebook_web/live/file_select_component.ex | 2 +- lib/livebook_web/live/home_live/import_file_upload_component.ex | 2 +- lib/livebook_web/live/output/file_input_component.ex | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/livebook_web/live/file_select_component.ex b/lib/livebook_web/live/file_select_component.ex index 3e9c2ddb0..d822a7a0c 100644 --- a/lib/livebook_web/live/file_select_component.ex +++ b/lib/livebook_web/live/file_select_component.ex @@ -185,7 +185,7 @@ defmodule LivebookWeb.FileSelectComponent do class="grow -m-1 p-1 h-full rounded-lg overflow-y-auto tiny-scrollbar" tabindex="-1" phx-hook="Dropzone" - id="upload-file-dropzone" + id="file-select-upload-dropzone" >
<%= live_file_input(@uploads.folder, class: "hidden", aria_labelledby: "import-from-file") %> diff --git a/lib/livebook_web/live/home_live/import_file_upload_component.ex b/lib/livebook_web/live/home_live/import_file_upload_component.ex index 5eff65981..7833e725c 100644 --- a/lib/livebook_web/live/home_live/import_file_upload_component.ex +++ b/lib/livebook_web/live/home_live/import_file_upload_component.ex @@ -28,7 +28,7 @@ defmodule LivebookWeb.HomeLive.ImportFileUploadComponent do
<%= if @uploads.notebook.entries == [] do %> Drop your notebook here diff --git a/lib/livebook_web/live/output/file_input_component.ex b/lib/livebook_web/live/output/file_input_component.ex index f89891366..febe04178 100644 --- a/lib/livebook_web/live/output/file_input_component.ex +++ b/lib/livebook_web/live/output/file_input_component.ex @@ -35,7 +35,7 @@ defmodule LivebookWeb.Output.FileInputComponent do class="inline-flex flex-col gap-4 p-4 border-2 border-dashed border-gray-200 rounded-lg cursor-pointer" phx-drop-target={@uploads.file.ref} phx-hook="Dropzone" - id="upload-file-dropzone" + id={"#{@id}-upload-dropzone"} >
<%= if @value do %>