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

Suggestions going off the viewport issue #815

Open
engmat opened this issue Jan 22, 2021 · 1 comment
Open

Suggestions going off the viewport issue #815

engmat opened this issue Jan 22, 2021 · 1 comment

Comments

@engmat
Copy link

engmat commented Jan 22, 2021

Hello.

I've encountered an issue with autocomplete inputs that are near the edge of a screen with values that are fairly long. If you use "flex" to show the entire label, it goes off the screen and requires the user to scroll.

Example (the blue on the right of the screenshot is my code editor):
image

I've looked through the documentation and took a peek through the code, but there doesn't seem to be a way to tell the input to make the box work from the right position of the input instead of the left.

Whilst I could make it so the suggestions are only as long as the input through a specific width or via 'auto', I do have a few cases where I need the label to at least be fully visible. The closest I could get was to use "beforeRender" to set the left and right positioning styles directly but the code overwrites the "left" position with it's defaults when it's constructed and made visible (confirmed with messing around with the developers console).

Is there anything else I can do to make the align from the right or be prevented from going off the view that I'm missing, or is this something that can't be done?

@Channel80
Copy link

I fixed it for me with an additional style for ui-menu or ui-autocomplete like

.ui-menu { width: 50vh !important; }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants