From 60565abfbf016f26c68254b0f89ab91ef2bd04aa Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Wed, 3 Aug 2022 14:27:44 +0100 Subject: [PATCH] Allow removing users from user assignment modal and add validation to prevent invalid submissions --- .../bbui/src/Form/Core/PickerDropdown.svelte | 3 +- packages/bbui/src/Form/PickerDropdown.svelte | 2 + .../_components/AssignmentModal.svelte | 81 ++++++++++++++----- 3 files changed, 64 insertions(+), 22 deletions(-) diff --git a/packages/bbui/src/Form/Core/PickerDropdown.svelte b/packages/bbui/src/Form/Core/PickerDropdown.svelte index db19dab6ac..28cb2b2a4e 100644 --- a/packages/bbui/src/Form/Core/PickerDropdown.svelte +++ b/packages/bbui/src/Form/Core/PickerDropdown.svelte @@ -34,6 +34,7 @@ export let isOptionSelected = () => false export let isPlaceholder = false export let placeholderOption = null + export let showClearIcon = true const dispatch = createEventDispatcher() let primaryOpen = false @@ -129,7 +130,7 @@ class:labelPadding={iconData} class:open={primaryOpen} /> - {#if primaryValue} + {#if primaryValue && showClearIcon}