Dynamic Items in ComboBox does not rerender when changed #800
-
i have the reactive variable <Popover.Root bind:open let:ids>
<Popover.Trigger asChild let:builder>
<Button
builders={[builder]}
variant="outline"
role="combobox"
aria-expanded={open}
class="w-[300px] justify-between overflow-hidden"
>
{address || "Search Address..."}
</Button>
</Popover.Trigger>
<Popover.Content class="w-[300px] p-0">
<Command.Root onKeydown={searchAddress}>
<Command.Input placeholder="Search Address..." autocomplete="off" />
<Command.Group>
{#each addressOptions as option (option.value)}
<Command.Item
value={option.value}
onSelect={() => {
onSelectAddress(option.meta);
closeAndFocusTrigger(ids.trigger);
}}
>
{option.label}
</Command.Item>
{/each}
</Command.Group>
</Command.Root>
</Popover.Content>
</Popover.Root> |
Beta Was this translation helpful? Give feedback.
Answered by
buymed-hoangpham
May 21, 2024
Replies: 1 comment 6 replies
-
add shouldFilter={false} into Command.Root, it's fixed! |
Beta Was this translation helpful? Give feedback.
6 replies
Answer selected by
huntabyte
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
add shouldFilter={false} into Command.Root, it's fixed!