Ng2-select: Add option to disable manual input

Created on 10 Mar 2016  路  11Comments  路  Source: valor-software/ng2-select

Original select2 had an option called Hiding the search box which would disable manual user input for a dropdown. This is very useful when you have a small list of options in a dropdown and don't want the user to be able to type.

Most helpful comment

[searchable]="false" [clearable]="false"

All 11 comments

馃憤 Any update on the anticipated availability of this feature?

dis you achieve this ?

Bump

you could just override the css and hide it

.ui-select-search {
display: none;
}

@dafreaki this does not appear to work either.

here what i did

in the style.css

/* hiding the search */
.no-search-select .ui-select-container{
min-height: 34px;
}
.no-search-select .ui-select-search {
display: none;
}
.no-search-select .ui-select-choices{
margin-top: -34px !important;
}

in the html

search box is hidding ok, but value cant able select?

[noAutoComplete]="true"

[searchable]="false" [clearable]="false"

@jeffhughescitadel Thanks a lot!

Nothing here works

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jay-perera picture jay-perera  路  6Comments

Cadenei picture Cadenei  路  4Comments

Kiwi15 picture Kiwi15  路  4Comments

Hasnain-Bukhari picture Hasnain-Bukhari  路  3Comments

jenb34 picture jenb34  路  5Comments