From 33e0418d08c29f829b00ee3bc41972dfce6a3370 Mon Sep 17 00:00:00 2001 From: Ryo Matsukawa <76232929+ryo-manba@users.noreply.github.com> Date: Sun, 5 Jan 2025 21:32:30 +0900 Subject: [PATCH] fix(popover): correct position logic (#4498) * fix(popover): invalid placement logic * chore(select): add story with popover position * chore: add changeset * chore: add pattern of popover story * chore: fix changeset --- .changeset/lazy-rice-wash.md | 6 + .../stories/autocomplete.stories.tsx | 20 +++ packages/components/dropdown/package.json | 1 - .../components/dropdown/src/use-dropdown.ts | 24 +--- .../dropdown/stories/dropdown.stories.tsx | 25 ++++ .../popover/src/free-solo-popover.tsx | 2 +- .../popover/src/popover-content.tsx | 7 +- .../components/popover/src/use-popover.ts | 25 +++- .../select/stories/select.stories.tsx | 20 +++ pnpm-lock.yaml | 119 +++++++++--------- 10 files changed, 157 insertions(+), 92 deletions(-) create mode 100644 .changeset/lazy-rice-wash.md diff --git a/.changeset/lazy-rice-wash.md b/.changeset/lazy-rice-wash.md new file mode 100644 index 0000000000..47e62f67ec --- /dev/null +++ b/.changeset/lazy-rice-wash.md @@ -0,0 +1,6 @@ +--- +"@nextui-org/dropdown": patch +"@nextui-org/popover": patch +--- + +Fix incorrect initial popover animation and arrow display (#4466) diff --git a/packages/components/autocomplete/stories/autocomplete.stories.tsx b/packages/components/autocomplete/stories/autocomplete.stories.tsx index a63fdf61b4..9c48731f5e 100644 --- a/packages/components/autocomplete/stories/autocomplete.stories.tsx +++ b/packages/components/autocomplete/stories/autocomplete.stories.tsx @@ -1187,3 +1187,23 @@ export const CustomItemHeight = { itemHeight: 40, }, }; + +export const PopoverTopOrBottom = { + args: { + ...defaultProps, + }, + render: (args) => ( +
+
+
+