question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Menu control issue

See original GitHub issue

Hi,

I’m trying to use an <Avatar /> as a control for a menu but it seems it doesn’t work properly (I cannot click the element and open the menu) when you wrap the element between <Suspense />

I’m getting the initials from an async call, the hardcoded example is just to recreate the issue

        <Menu
          menuPosition={{ top: 40, right: 0 }}
          control={
            <Suspense fallback="...">
              <Avatar>JM</Avatar>
            </Suspense>
          }
        >
          <MenuItem icon={<RiSettings2Line />}>Settings</MenuItem>
          <MenuItem icon={<RiMessage3Line />}>Messages</MenuItem>
          <Hr />
          <MenuItem color="red">Delete account</MenuItem>
        </Menu>

Thanks.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
rtivitalcommented, May 17, 2021

You need to spread props to target element – https://codesandbox.io/s/zealous-euclid-h6vly?file=/src/App.tsx

0reactions
juan-manuel-alberrocommented, May 17, 2021

Following your example, I added the other cases I tried before - https://codesandbox.io/s/musing-lovelace-unywp For some reason including the parent inside the component didn’t work.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Fix problems with the Start menu - Microsoft Support
Learn more about how to fix problems with the Windows Start menu, and what to do if the Start menu won't open.
Read more >
Menu control problem controller/keyboard : r/RocketLeague
Sometimes I can't control the menus in Rocket League with my controller temporarily. I have to use the mouse because the controller won't...
Read more >
PC XBOX controller not working on menus - Steam Community
PC XBOX controller not working on menus. The game crashed to desktop, once I loaded ... The latest update messed up my xbox...
Read more >
How to fix Controller Issues in Windows... - YouTube
After the recent windows updates and large updates from some of the manufacturers of some of these devices it seems many controllers are...
Read more >
ASP.NET Menu Control Issue in Chrome and Safari
While using ASP.NET menu control at that time, Safari as well as Chrome did not render that control properly. That's the reason why...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found