Skip to content
This repository was archived by the owner on Sep 13, 2020. It is now read-only.

Conversation

@colmbrady
Copy link

When using menu in RTL mode or with end|right position, the offset should be calculated correctly.

This commit ensures that the initialMenuMultiplier is used to adjust the offset depending on the menuPosition.

colmbrady added 2 commits July 4, 2018 20:13
…n RTL mode, the menu does not correctly render. It should render at the start of the viewport, which would be on the right in RTL mode. Instead it continues to render on the left.

`left` and `right` positions are misleading in this library. The intention of `left` and `right` (as per how its coded) is to behave more like `start` and `end` in React Native.

- This commit adds some new menuPosition props options for `start` and `end` which are intended to deprecate `left` and `right`.
- It also adds a new function to allow calculating whether we should consider the menuPosition as at the 'start' of the viewport which will be left in LTR mode and right in RTL mode.
- It also adds a function which uses this new calculation to decide what side the menu should be rendered on.
@colmbrady colmbrady closed this Jul 4, 2018
@colmbrady colmbrady deleted the bugfix/hiddenMenuOffset_respects_menupos branch July 4, 2018 09:47
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant