Skip to content

Add ability to provide an anchor for the popover #4013

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
innocenzi opened this issue Apr 28, 2025 · 0 comments · Fixed by #4119
Closed

Add ability to provide an anchor for the popover #4013

innocenzi opened this issue Apr 28, 2025 · 0 comments · Fixed by #4119
Labels
enhancement New feature or request triage v3 #1289

Comments

@innocenzi
Copy link

Description

The popover uses the content of the default slot to create a trigger, but there is no way to provide a custom anchor. A <template #anchor> slot for this purpose would be great.

<UFormField label="name" name="name">
  <UPopover :open="isAutoCompleteOpen">
    <template #anchor>
      <UInput v-model="state.name" />
    </template>
    <template #content>
      <Placeholder class="size-48 m-4 inline-flex" />
    </template>
  </UPopover>
</UFormField>

My use case is building an autocomplete for a text input. The InputMenu is not suitable because the dropdown is too intrusive.

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request triage v3 #1289
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant