combobox: don't use portal for picker

fixes z-stacking issues when used within dialogs
This commit is contained in:
Elijah Duffy
2026-03-13 16:27:35 -07:00
parent bcfd3ea740
commit 50c052a3c3

View File

@@ -41,8 +41,7 @@
import Label from './Label.svelte'; import Label from './Label.svelte';
import StyledRawInput from './StyledRawInput.svelte'; import StyledRawInput from './StyledRawInput.svelte';
import { InputValidatorEvent, validate, type ValidatorOptions } from '@svelte-toolkit/validate'; import { InputValidatorEvent, validate, type ValidatorOptions } from '@svelte-toolkit/validate';
import { onMount, tick, untrack, type Snippet } from 'svelte'; import { untrack, type Snippet } from 'svelte';
import { Portal } from '@jsrob/svelte-portal';
import { scale } from 'svelte/transition'; import { scale } from 'svelte/transition';
import { generateIdentifier, type IconDef } from './util'; import { generateIdentifier, type IconDef } from './util';
import type { ClassValue, MouseEventHandler } from 'svelte/elements'; import type { ClassValue, MouseEventHandler } from 'svelte/elements';
@@ -502,8 +501,7 @@
<svelte:window onclick={handleWindowClick} /> <svelte:window onclick={handleWindowClick} />
<!-- Combobox picker --> <!-- Combobox picker -->
<Portal target="body"> {#if open}
{#if open}
<!-- Picker container --> <!-- Picker container -->
<div <div
class={[ class={[
@@ -548,8 +546,7 @@
{/if} {/if}
{/each} {/each}
</div> </div>
{/if} {/if}
</Portal>
<!-- Combobox main input container --> <!-- Combobox main input container -->
<div class={classValue}> <div class={classValue}>