Bootstrap theme doesn't cut off text past border
Hello, I'm using the ui-select with the bootstrap theme, but when I select an option that has an text past the input box size, the text doesn't cut off like the one in select2 theme.
Here's how I fixed the issue
.ui-select-bootstrap .ui-select-match-text > span { display: block; text-overflow: ellipsis; overflow: hidden; }
thanks for the fix. This does solve the problem, but it also increases the select box's height when something is selected. To counter this, I had to set the height of .btn-select-white, which causes the location of the dropdown caret to be out of place. Tried changing the caret's margin-top, but a pristine select box and a selected select box have the caret at different locations.
If there another way where it doesn't change the input box's size, or another fix so the caret don't change location.
Thanks
I think my instance is inheriting a white-space: nowrap from somewhere. If you add that in, the text should keep to one line.
this is how i fixed it:
.ui-select-toggle { &.btn { padding-right: 23px; } }
Fix is not working for me:
http://plnkr.co/edit/7vHdHfhwZkw4x5lR6wTl?p=preview
Any idea why?
I had the same problem as the pull-left on the ui-select-match-text element will cancel text-overflow. You can try:
.ui-select-match-text {
&.pull-left {
float: none !important;
}
> span {
display: block;
text-overflow: ellipsis;
overflow: hidden;
}
}
Can you please, fork my plunk and fix it?
You'll find the css adjustment at the end of style.css
http://plnkr.co/edit/Qmxx7CHf3crnXxc8QXCk?p=preview
Thanks, now it works fine!
@exaptis Your fix has a problem with the allow-clear option

@gerardp i found a quick-fix, but the solution is not pretty. ui-select does not provide a dedicated class for the clear icon :-(
http://plnkr.co/edit/Qmxx7CHf3crnXxc8QXCk?p=preview
.ui-select-toggle > a.btn-link {
top: 6px;
position: absolute;
right: 20px;
}
.ui-select-match-text {
margin-right: 35px;
}
@exaptis It works, thanks !!
@lin1412 should this issue really be closed without pull-request? Because it is a bug in the stylesheet, therefore it should only be closed after the bug fix was merged. If you re-open this issue I'll provide a pull-request to fix it.
hi, I am still having issue on this
-- html file

-- css file .ui-select-bootstrap .ui-select-match-text > span { display: block !important; text-overflow: ellipsis!important; overflow: hidden!important; white-space: nowrap!important;}
@jsudarman please provide a plnkr sample.
http://plnkr.co/edit/NAkPOpGK7aqmgpZ8rrPE?p=preview
@exaptis
.ui-select-match-text {
&.pull-left {
float: none !important;
}
> span {
display: block;
text-overflow: ellipsis;
overflow: hidden;
}
}
didn't work for me too, but
.ui-select-toggle > a.btn-link {
top: 6px;
position: absolute;
right: 20px;
}
.ui-select-match-text {
margin-right: 35px;
}
actually worked. Can you help on that?