mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-18 19:46:57 +02:00
fix(v2): do not set height for mobile dropdown (#3647)
This commit is contained in:
parent
9f66545c8c
commit
f085560b66
1 changed files with 5 additions and 3 deletions
|
@ -179,6 +179,10 @@ function NavItemMobile({
|
|||
);
|
||||
}
|
||||
|
||||
const menuListHeight = menuListRef.current?.scrollHeight
|
||||
? `${menuListRef.current?.scrollHeight}px`
|
||||
: undefined;
|
||||
|
||||
return (
|
||||
<li
|
||||
className={clsx('menu__list-item', {
|
||||
|
@ -197,9 +201,7 @@ function NavItemMobile({
|
|||
className="menu__list"
|
||||
ref={menuListRef}
|
||||
style={{
|
||||
height: !collapsed
|
||||
? `${menuListRef.current?.scrollHeight}px`
|
||||
: undefined,
|
||||
height: !collapsed ? menuListHeight : undefined,
|
||||
}}>
|
||||
{items.map(({className: childItemClassName, ...childItemProps}, i) => (
|
||||
<li className="menu__list-item" key={i}>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue