When optimizing the position of the context menu component #8 , I mainly made the following changes
Obtained the actual width and height of the menu container and stored them in corresponding state variables.
Adjusted the position of the menu based on its size and the viewport dimensions to ensure that it renders correctly within the boundaries.
With these optimizations, the menu's position is adjusted based on its actual width and height, ensuring that it renders within the boundaries and does not exceed them.
When optimizing the position of the context menu component #8 , I mainly made the following changes
With these optimizations, the menu's position is adjusted based on its actual width and height, ensuring that it renders within the boundaries and does not exceed them.