Skip to content

Commit

Permalink
fix(frontend): fix mobile multi select (#2431)
Browse files Browse the repository at this point in the history
* fix(frontend): fix mobile multi select

* fix(frontend): fix mobile multi select

* fix(frontend): fix mobile multi select
  • Loading branch information
fatonramadani authored Oct 11, 2023
1 parent 4d26c01 commit cb2b6df
Showing 1 changed file with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,6 @@
ulSelectedClass={`${resolvedConfig.allowOverflow ? '' : 'overflow-auto max-h-full'} `}
ulOptionsClass={'p-2 !bg-surface-secondary'}
bind:selected={value}
on:change={() => {
outputs?.result.set([...(value ?? [])])
}}
options={Array.isArray(items) ? items : []}
placeholder={resolvedConfig.placeholder}
allowUserOptions={resolvedConfig.create}
Expand All @@ -163,12 +160,23 @@
open = false
}}
>
<div slot="option" let:option>
<!-- svelte-ignore a11y-no-static-element-interactions -->
<div
slot="option"
let:option
on:mouseup|stopPropagation
on:pointerdown={(e) => {
const nValue = [...(value ?? []), option]
value = [...new Set(nValue)]
outputs?.result.set([...(value ?? [])])
}}
>
{option}
</div>
</MultiSelect>
<Portal>
<div use:floatingContent class="z5000" hidden={!open}>
<!-- svelte-ignore a11y-no-static-element-interactions -->
<!-- svelte-ignore a11y-click-events-have-key-events -->
<div
bind:this={portalRef}
Expand Down

0 comments on commit cb2b6df

Please sign in to comment.