nuxt / ui

A UI Library for Modern Web Apps, powered by Vue & Tailwind CSS.
https://ui.nuxt.com
MIT License
4.11k stars 542 forks source link

Popover: Input Field Becomes Unusable When open Prop is Used #2722

Open cdwmhcc opened 17 hours ago

cdwmhcc commented 17 hours ago

For what version of Nuxt UI are you suggesting this?

v3.0.0-alpha.x

Description

Where the UInput component inside a UPopover becomes unusable when the open prop is controlled externally. Specifically, when the open prop is used to control the display of the popover, the UInput component receives a type="button" attribute. This issue will cause the input component to be unable to enter text

<UPopover class="w-120" :open="searchOpen">
    <UInput
    v-model="searchKeyword"
    color="neutral"
    variant="soft"
    size="xl"
    :ui="{
        base: 'w-120',
    }"
    />
    <template #content>
        <Placeholder class="size-48 m-4 inline-flex" />
    </template>
</UPopover>

I don't know if this is a bug or if the logic is just like this.

Additional context

No response