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
Allow specifying overlay width #942
Comments
We have the exact issue described; Vaadin suggested a workaround, which solves our immediate problem:
./styles/vaadin-combo-box-overlay.css:
Or, if you only want it on some comboboxes:
|
Duplicate of /issues/529. See the suggested demo improvement at #529 (comment) |
To dynamically update the ComboBox overlay width: :host([theme="my-combo-box"]) {
width: var(--my-combo-box-overlay-width, 200px) !important;
} UI.getCurrent().getPage().executeJs("ShadyCSS.styleDocument({'--my-combo-box-overlay-width': $0 + 'px'})", newWidthAsInteger); |
I can confirm that the following code works nicely as suggested by @Haprog comboBox.getElement().getStyle().set("--vaadin-combo-box-overlay-width", "400px") |
The new docs site has examples of using a feature mentioned above: |
Follow-up ticket: vaadin/flow-components#2331 |
It seems that the overlay element's width is fixed to be the same as the input field's. In some cases (short input, long item captions) it would be useful to allow customizing the overlay width to be larger. If this is doable with styles, such a method should be documented.
The text was updated successfully, but these errors were encountered: