I use a Vaadin ComboBox to create a dropdown menu, where the user can set a state which will be displayed in another element of the web page. So I really do not need the text-field-part of the ComboBox (the blue line in the image).
Setting the width manually to 0 in the browser gives the perfect result (no line visible, no text input area available for focus), however I am unable to achieve this using code. Please help me.
I used the example in this tutorial (see vaadin-text-field-styles.css), which changes all ComboBoxes on my web page. The current status looks like this:
//Java-code:
comboBox.addClassName("RemoveTextField");
/* CSS-File */
:host([class="RemoveTextField"]) [part="input-field"] {
width: 0px;
}
The CSS rule is not used, I guess the problem is that the .host-selector is not working as I think. As I am a CSS noob please enlighten me how I can use a selector for an element outside the shadow dom.