Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

select with form-control class doesn't look right #371

Closed
clarkorz opened this Issue · 4 comments

4 participants

@clarkorz

When select tag has class form-control:

<select class="form-control select-block">
      <option>1</option>
      <option>1</option>
      <option>1</option>
      <option>1</option>
      <option>1</option>
    </select>

$("select").selectpicker({style: 'btn-primary', menuStyle: 'dropdown-inverse'});

It will be rendered like this:
2014-02-16 12 13 47

@clarkorz

Of cause, I could remove form-control class from select tag, or add a style of padding:0;border:0;. But bootstrap uses this class on select tag, which means, when switching from bootstrap to Flat UI, there is one more work to do.

@sstativa

As a temporary solution I would suggest you to play with bootstrap-select.js
if you change row 55 from

if(classList[i] != 'selectpicker') {

to

if(classList[i] != 'selectpicker' && classList[i] != 'form-control') {

the problem will be solved, but in the same way as you did.
Probably, if you play with this row and add some Flat-UI detection you'll be able to fix the issue when you switch between Flat-UI and native Bootstrap.

@andrew-ml
Collaborator

Hi, clarkorz,
we switched to the powerful select2.js library in the latest release (v1.3.0), please try it out.

@andrew-ml andrew-ml closed this
@clarkorz

Thanks to notice, I'll look into it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.