From b1797627ce391ea9f4078d2cbec12e4d4368cba4 Mon Sep 17 00:00:00 2001 From: Dean Date: Wed, 21 Sep 2022 14:11:04 +0100 Subject: [PATCH] Hide the file attachment dropzone when the picker is disabled --- packages/bbui/src/Form/Core/Dropzone.svelte | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/bbui/src/Form/Core/Dropzone.svelte b/packages/bbui/src/Form/Core/Dropzone.svelte index 3102972d1e..51f6eef6f9 100644 --- a/packages/bbui/src/Form/Core/Dropzone.svelte +++ b/packages/bbui/src/Form/Core/Dropzone.svelte @@ -65,6 +65,9 @@ } } + $: showDropzone = + (!maximum || (maximum && value?.length < maximum)) && !disabled + async function processFileList(fileList) { if ( handleFileTooLarge && @@ -211,7 +214,7 @@ {/each} {/if} {/if} - {#if !maximum || (maximum && value?.length < maximum)} + {#if showDropzone}