mui / mui/base-ui

[menu] Motion with Menu

Open
#3,696 3 comments 0 reactions 0 assignees View on GitHub
component: menu external dependency
Dominant language
TypeScript
Stars
10.9k
Forks
543
Avg merge
1d 20h
Merged PRs (30d)
101

Description

# Bug report

## Current behavior

Bug when using Motion with Menu: when using the render component in Menu.Popup, the initial side value is always “bottom” and only switches to “top” after requestAnimationFrame. As a result, if you set the initial animation with side === “top”, it won’t run; in practice it only recognizes side === “bottom”.

```typescript
{
console.log("state", state); // allway bottom
return (
{
if (!open) {
actionsRef?.current.unmount();
}
}}
transition={{
duration: 0.2,
ease: "easeOut",
}}
/>
);
}}
>
{children}

```

## Base UI version

1.0.0

## Which browser are you using?

Chrome

## Which OS are you using?

Mac OS.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.