NativeSelect with Restrain
sevokn opened this issue · 2 comments
I am trying to use Restrain to apply minimum widths to NativeSelect components in Vaadin.
When I try to use Restrain on a NativeSelect, the minimum width restriction is applied to the div element that wraps the select element, not the select element itself. So for example, the red "required" asterisk is displayed at the desired width, but the select element stays at the original width as determined by the length of the text of the options in the drop-down of the select element.
Any quick tips for how to make this work, or is a updated version of Restrain needed?
You could try and set the width of the select element to 100% using CSS:
.v-select-select {
width: 100%;
}
Components which do not respect the size of their root element are out of scope for the Restrain add-on, and should be fixed in the components themselves.