From 5477ffe5755247651d513a6f6b87a1857a64394b Mon Sep 17 00:00:00 2001 From: Peter Clement Date: Fri, 29 Jul 2022 13:17:17 +0100 Subject: [PATCH] improve email validation --- .../bbui/src/Form/Core/InputDropdown.svelte | 10 ++++++ .../bbui/src/Form/Core/PickerDropdown.svelte | 35 ++++++++----------- packages/bbui/src/Form/PickerDropdown.svelte | 7 ++++ .../users/_components/AddUserModal.svelte | 9 ++++- .../_components/NameTableRenderer.svelte | 2 +- 5 files changed, 41 insertions(+), 22 deletions(-) diff --git a/packages/bbui/src/Form/Core/InputDropdown.svelte b/packages/bbui/src/Form/Core/InputDropdown.svelte index 723b8ba9b1..8865ee3ddc 100644 --- a/packages/bbui/src/Form/Core/InputDropdown.svelte +++ b/packages/bbui/src/Form/Core/InputDropdown.svelte @@ -115,6 +115,16 @@ class:is-disabled={disabled} class:is-focused={focus} > + {#if error} + + {/if} + { - return x.name === primaryFieldText - }) - */ + + const updateSearch = e => { + dispatch("search", e.detail) + } + const updateValue = newValue => { if (readonly) { return @@ -107,16 +103,6 @@ updateValue(event.target.value) } } - - const getFilteredOptions = (options, term, getLabel) => { - if (autocomplete && term) { - const lowerCaseTerm = term.toLowerCase() - return options.filter(option => { - return `${getLabel(option)}`.toLowerCase().includes(lowerCaseTerm) - }) - } - return options - }
+ {#if autocomplete} + updateSearch(event)} + {disabled} + placeholder="Search" + /> + {/if} +
    {#if placeholderOption}
  • { + searchTerm = e.detail + } {/each}
    diff --git a/packages/builder/src/pages/builder/portal/manage/users/_components/NameTableRenderer.svelte b/packages/builder/src/pages/builder/portal/manage/users/_components/NameTableRenderer.svelte index af61ea2d57..a4b65c4d62 100644 --- a/packages/builder/src/pages/builder/portal/manage/users/_components/NameTableRenderer.svelte +++ b/packages/builder/src/pages/builder/portal/manage/users/_components/NameTableRenderer.svelte @@ -17,7 +17,7 @@
    {value} {:else} -
    Not Available
    +
    -
    {/if}