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

Menu: Add ability to right align #3753

Closed
melloware opened this issue Dec 7, 2022 · 1 comment · Fixed by #4416
Closed

Menu: Add ability to right align #3753

melloware opened this issue Dec 7, 2022 · 1 comment · Fixed by #4416
Assignees
Labels
Core Team Issue or pull request has been *opened* by a member of Core Team Type: New Feature Issue contains a new feature or new component request
Milestone

Comments

@melloware
Copy link
Member

melloware commented Dec 7, 2022

Describe the feature you would like to see added

It would be nice if there was an option to right align a dropdown menu to it's initiator. A good example from Bootstrap here:

https://getbootstrap.com/docs/4.0/components/dropdowns/#menu-alignment

Similar to PrimeVue request: primefaces/primevue#3381

Is your feature request related to a problem?

No

Describe the solution you'd like

Right now it seems to always default to a best fit, so would be nice to for instance, right align first and then only best fit after that.

Describe alternatives you have considered

I've tried using an css offset which works if the menu needs to be a bit lower or something. But an offset here, would completely throw things off on the auto align. For instance on desktop it could be made to look fine, but then on mobile the offset would completely throw it off.

Additional context

Currently the left side example is what happens, the right side example is the intended result.

image

@melloware melloware added Type: New Feature Issue contains a new feature or new component request Status: Discussion Issue or pull request needs to be discussed by Core Team labels Dec 7, 2022
@github-actions github-actions bot added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Dec 7, 2022
melloware added a commit to melloware/primereact that referenced this issue Dec 7, 2022
@melloware melloware added Core Team Issue or pull request has been *opened* by a member of Core Team and removed Status: Discussion Issue or pull request needs to be discussed by Core Team Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Dec 7, 2022
@melloware
Copy link
Member Author

Left: (default and current behavior)
image

Right:
image

@melloware melloware added this to the 8.7.4 milestone Dec 7, 2022
@melloware melloware self-assigned this Dec 7, 2022
melloware added a commit to melloware/primereact that referenced this issue Dec 8, 2022
@mertsincan mertsincan modified the milestones: 8.7.4, 10.0.0 Jan 26, 2023
melloware added a commit to melloware/primereact that referenced this issue May 17, 2023
@melloware melloware modified the milestones: 10.0.0, 9.5.0 May 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Core Team Issue or pull request has been *opened* by a member of Core Team Type: New Feature Issue contains a new feature or new component request
Projects
None yet
2 participants