Skip to content

Commit 10ef8be

Browse files
authored
fix: Prefer flipping submenu to left side over to the bottom (#853)
* fix: Prefer flipping submenu to left side over to the bottom * Bump version to 26.2.5
1 parent 3594542 commit 10ef8be

File tree

5 files changed

+7
-6
lines changed

5 files changed

+7
-6
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22

33
Reactist follows [semantic versioning](https://semver.org/) and doesn't introduce breaking changes (API-wise) in minor or patch releases. However, the appearance of a component might change in a minor or patch release so keep an eye on redesigns and make sure your app still looks and feels like you expect it.
44

5-
# Next
5+
# 26.2.5
66

77
- [Fix] Add top and bottom paddings to the `Tab` component.
8+
- [Fix] `SubMenu` will only render at the bottom when there isn't enough space in either side of the parent menu.
89

910
# 26.2.4
1011

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"email": "henning@doist.com",
77
"url": "http://doist.com"
88
},
9-
"version": "26.2.4",
9+
"version": "26.2.5",
1010
"license": "MIT",
1111
"homepage": "https://github.com/Doist/reactist#readme",
1212
"repository": {

src/menu/menu.stories.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ be changed by passing `modal={false}` to `<MenuList>`
126126

127127
You may nest the `<SubMenu>` component within `<Menu>` to create submenus.
128128

129-
On smaller viewports where there isn't enough space to render the submenu on the side, it will be rendered under its parent menu item instead.
129+
On smaller viewports where there isn't enough space to render the submenu on either side, it will be rendered under its parent menu item instead.
130130

131131
<Canvas>
132132
<Story

src/menu/menu.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ const MenuList = React.forwardRef<HTMLDivElement, MenuListProps>(function MenuLi
172172
className={classNames('reactist_menulist', exceptionallySetClassName)}
173173
getAnchorRect={getAnchorRect ?? undefined}
174174
modal={modal}
175-
flip={flip ?? (isSubMenu ? 'bottom' : undefined)}
175+
flip={flip ?? (isSubMenu ? 'left bottom' : undefined)}
176176
/>
177177
</Portal>
178178
) : null

0 commit comments

Comments
 (0)