Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: disable boundaries check #217

Closed
jbflo opened this issue Sep 1, 2022 · 2 comments
Closed

feat: disable boundaries check #217

jbflo opened this issue Sep 1, 2022 · 2 comments

Comments

@jbflo
Copy link

jbflo commented Sep 1, 2022

Do you want to request a feature or report a bug?
Bug

What is the current behavior?
When the menu Height is > to window Height the menu top position top goes off-screen
and you can't see some item

  if (_y + menuHeight > windowHeight) {
    _y -= _y + menuHeight - windowHeight;
  }

I would wonder why this minus , cause it cause problem when the menu has a lot of item.
it loose the fix position

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React. :

Just add a lot of item to your Menu , as much as to make the menu height > to the window screen
to have the scroll bar.

What is the expected behavior?
Menu position should preserve the fix position

the Hook function to set the State position i would say it is not necessary or should be updated

Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?
React 16.*
Chrome , Opera, Firefox

@fkhadra
Copy link
Owner

fkhadra commented Nov 3, 2022

Actually, this is by design, the position is recomputed using to prevent the menu for going outside the window. I'll add an option to disable the behavior in the next release

@fkhadra fkhadra added this to the v6.0.0 milestone Nov 3, 2022
@fkhadra fkhadra changed the title Menu auto repositioning feat: disable boundaries check Nov 3, 2022
@fkhadra
Copy link
Owner

fkhadra commented Nov 3, 2022

Fixed by #220

@fkhadra fkhadra closed this as completed Nov 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants