Vue-select: Bootstrap form-control

Created on 27 Mar 2017  路  6Comments  路  Source: sagalbot/vue-select

I am having an issue with my form control class from bootstrap

image

default classes are overriding bootstrap classes

<div class="form-group"> <label for="departament" class="col-md-3 control-label">{{__("Departament")}}:</label><div class="col-md-6"><v-select :options="['foo','bar']"></v-select</div></div>
or am i doing something wrong ?

ui

Most helpful comment

Are you writing any scss yourself? You could do something like:

.v-select .dropdown-toggle {
  @extend .form-control;
}

All 6 comments

Check the source, this component doesn't use any bootstrap class. What's been overridden in you example?

@zeratulmdq
it has a class in the input
https://github.com/sagalbot/vue-select/blob/master/src/components/Select.vue#L275
which is not being applied to my template

screenshot at mar 27 13-15-36

Now if i add the class in the
<v-select class="form-control" :options="['foo','bar']"></v-select>

it looks like:
image

with the classes being applied but looking pretty bad

image

Are you writing any scss yourself? You could do something like:

.v-select .dropdown-toggle {
  @extend .form-control;
}

Same problem here. I can't make it work:

<v-select class="form-control" v-model="form.cod_municipio_ibge" :options="['foo','bar']"></v-select>

@eduarguzher, did you make it work anyway?

@setefocos that will just apply the form-control class to the wrapper, not the actual input. Since v2.1.0 I dropped the bootstrap dependencies to make it work better with all CSS frameworks, so you'll have to write some css yourself.

Tambem estou com o mesmo probelma, estou usando o sass e fiz como mandou:
.v-select .dropdown-toggle {
@extend .form-control ;
}

mas n茫o adiantou.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

NexoraSolutions picture NexoraSolutions  路  3Comments

edalzell picture edalzell  路  3Comments

fabianmieller picture fabianmieller  路  3Comments

davidalvarezr picture davidalvarezr  路  3Comments

ducdev picture ducdev  路  3Comments