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

ui5-multi-combo-box: Changes width on selection change in some cases #1812

Closed
MarcusNotheis opened this issue Jun 16, 2020 · 3 comments
Closed
Assignees

Comments

@MarcusNotheis
Copy link
Collaborator

Describe the bug
When using the ui5-multi-combobox in a Form-like display mode (label on the left) it changes it's own width when there is an at least one active selection. If no item is selected, the width seems to be fine.

To reproduce
Steps to reproduce the behavior:

  1. Open the provided sandbox
  2. Deselect the selected item (MCB gets smaller)
  3. Select another item (MCB grows again)

Isolated example
https://codesandbox.io/s/ui5-webcomponents-lt2k9?file=/index.html

Expected behavior
I would expect that the MCB does not change its total width.

Screenshots
If applicable, add screenshots to help explain your problem.
Screen-Recording-2020-06-16-at-10 54 18

Context

  • UI5 Web Components version: 1.0.0-rc.7
  • OS/Platform: MacOS
  • Browser (if relevant): Chrome

Affected components (if known)

  • ui5-multi-combobox

Log output / Any errors in the console
Other input components like the select is working fine.

@MarcusNotheis
Copy link
Collaborator Author

Original issue: SAP/ui5-webcomponents-react#564

@MarcusNotheis
Copy link
Collaborator Author

Might be related to #1719 as well?

@MapTo0
Copy link
Member

MapTo0 commented Aug 12, 2020

Well ... to be honest I am not sure how we can resolve that issue without setting a fixed width of the combobox.
To me this looks like a flexbox question here is a similar question: https://stackoverflow.com/questions/21406397/width-ignored-on-flexbox-items

Try adding flex-shrink: 0; to the parent (display: flex) container.

@MapTo0 MapTo0 closed this as completed Aug 12, 2020
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