Replies: 1 comment
-
I just encountered this myself. While the In your shadcn/ui export const PopoverAnchor = PopoverPrimitive.PopoverAnchor; And now you can use the <Popover open={Boolean(search)}>
<PopoverAnchor>
<Container>
<SearchInput searchTerm={searchTerm} setSearchTerm={setSearchTerm} onSubmit={onSubmit} />
</Container>
</PopoverAnchor>
<PopoverContent>
<SearchResult search={search} isLoading={isLoading} isFetching={isFetching} />
</PopoverContent>
</Popover> |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am working on a feature where a popover should appear when a search yields results. However, I want the popover to display relative to the search container or input field, rather than the typical trigger element. Is there a way to manually trigger the popover and change its reference position to another element? In my scenario, I aim for the popover to show up once a search is complete, with its position anchored to the search container or input field. Any guidance or examples on how to accomplish this would be greatly appreciated!
Beta Was this translation helpful? Give feedback.
All reactions