I have made a select control using the documentation as an example. However, the button changes its width depending on the width of the text for the selected item. This makes the control jump around and is not a good UI design.
Is there a way to specify using fill
or to have the button be a fixed width? While I was partly successful in setting a fixed width, the rendered control was ugly, with both the text and arrow being centered, as shown here:
Instead, what I want is this:
How can this be created with blueprintjs?
Because someone will ask for an SSCCE, here is exactly what I used: https://blueprintjs.com/docs/#select/select-component
Edit:
I have been able to get the result I want, but it does seem like the library itself should handle this instead of resorting to a series of CSS hacks. The following CSS changes produce the desired output, but I am still hoping for a better answer.
.selectButton,
.selectButton > span,
.selectButton > span > div,
.selectButton > span > div > button {
width: 100%;
}
.selectButton > span > div > button {
display: inline;
}
.selectButton span.bp3-icon-caret-down {
float: right;
}