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

Input Suggestion List does not truncate #1971

Closed
allen138 opened this issue Jul 21, 2020 · 0 comments · Fixed by #1979
Closed

Input Suggestion List does not truncate #1971

allen138 opened this issue Jul 21, 2020 · 0 comments · Fixed by #1979
Assignees
Labels

Comments

@allen138
Copy link

Describe the bug
If there is really long title or description in the list item, the popover will continue to expand and will only truncate the text when it spans 100% of the page width. It seems there is proper css in place to handle truncation, but this relies on its parent's width. This width should be derived from the input's width. From what I can see in the fiori guidelines is that the input and the suggestions should be the same width. Please see: https://experience.sap.com/fiori-design-web/input-field/#autocomplete-suggestions.

To reproduce
Steps to reproduce the behavior:

  1. Go to https://sap.github.io/ui5-webcomponents/playground/components/Input/
  2. Scroll down to the "Input with suggestions"
  3. Open the console and override the mock ui5_database_entries by entering the following in the console
var ui5_database_entries = ["Argentinaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"];
  1. Type "a" in the input to see the popover. Notice the text is not truncated.
  2. You can inspect the popover and give it a width of 13.125rem to see that if it has a specified width, then the text becomes truncated.

Expected behavior
The popover width should be inherited from the inputs width to control truncation.

Screenshots
Current behavior:
input truncation isue

Expected Behavior:
input truncation expectation

Context

  • UI5 Web Components version: 0.21.8
  • OS/Platform: Window 10
  • Browser (if relevant): All
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants