Menu is not appearing at the correct position - reactjs

I am using react with material-UI, I designed the drop down menu button and it is opening somewhere else on the screen.
It happens when I add
className={styling.unit_menu}
in Menu button, When I add my own styling, then it happens
Here is the link for my code
code link

Related

Block scrolling when popover is opened

I'm not sure how to make the 'Popover' component of Material UI remain fixed on the screen when I open it. Because when I open the popover (https://mui.com/material-ui/react-popover/) It's not blocking the scroll and the box that appears after clicking is moving along the entire page. I don't want to keep the scroll bar visible while popover is open.
I'm using the latest version.
Image below
enter image description here
You can add overflow: hidden; to body element and remove it on close :) Tho its a weird behavior in docs as in source code there is no such thing, yet it happens

Switch between different menu in appbar

I have 4 icon buttons and when i click on one ,it menu should expand and when I click on the 2nd button previous menu should collapse and new menu should open at same time.I am using react js.Please suggest how i can achieve this

react-popper misplacing popper element

I have a menu component that uses popperjs for showing the popup menu. When clicked on the button for the first time the popup appears at top left corner of the screen instead of below the button. I have used react portal for placing the rendered menu.
The problem resolves when I use useState hook to capture references of popper and reference elements(as suggested in the examples on react-popper). But I have implemented a clickaway hook to hide popup when you click any where but the popup, for which I need to use useRef.
and then I do usePopper(refElem.current, popperElem.current). I have reproduced the problem here

React-native-navigation goBack() irregular

I encountered a problem when using
"#react-navigation/bottom-tabs": "^5.11.1"and"#react-navigation/native": "^5.8.9"
snack.expo.io
the operation is as follows:
After entering the main interface, click the tabBar B PAGE bottom
Click jump to B Detail
Click the headerRight custom Back button
Why do I return to the A page? When I click the B page button at the bottom again, I will jump to the Detail page. I don’t know why. Can you help me?
I think it's because you are using navigate.goBack(); it pops the last item in the stack and navigate to that; so when you're trying to use bottom tabs for navigation, you push a new screen to the stack which gets rendered on goBack();
consider using the screen name instead;

Codename One toolbar sidemenu issue

I created a list using table layout which contains checkbox and message.The list is scroll-able . When i scroll down everything works fine,Where as when i check the check box and scroll down the toolbar side menu is expanding.
My requirement is to open the toolbar sidemenu only on the sidemenu toogle button click other than any click on the screen side menu should be in close mode.

Resources