Skip to content
This repository was archived by the owner on Oct 2, 2019. It is now read-only.

Is there any way to set placeholder with search-enabled="false"? #241

Closed
mackenrou opened this issue Sep 30, 2014 · 4 comments
Closed

Is there any way to set placeholder with search-enabled="false"? #241

mackenrou opened this issue Sep 30, 2014 · 4 comments

Comments

@mackenrou
Copy link

This is my code:
<ui-select ng-model="data.selectEstablec" theme="selectize" search-enabled="false" style="width: 95%;">
<ui-select-match placeholder="Establecimiento...">{{$select.selected.nombre}}</ui-select-match>
<ui-select-choices repeat="est in establecimientos" value="{{est.id}}">{{est.nombre}}</ui-select-choices>
</ui-select>
When search is enabled, placeholder shows fine.

I tested this also:
<ui-select ng-model="data.selectEstablec" theme="selectize" search-enabled="false" data-placeholder="Establecimiento..." style="width: 95%;">
<ui-select-match>{{$select.selected.nombre}}</ui-select-match>
<ui-select-choices repeat="est in establecimientos" value="{{est.id}}">{{est.nombre}}</ui-select-choices>
</ui-select>
But placeholder is missing.

@burza
Copy link

burza commented Oct 3, 2014

i have the same question!

@hthabet
Copy link
Contributor

hthabet commented Oct 16, 2014

I fixed the problem by updating a condition in the ui-select-match directive tpl files.

@hthabet
Copy link
Contributor

hthabet commented Oct 17, 2014

You may notice that it is not working properly with bootstrap 3 selectize theme and this is because of the css rule !important on the input element :
selectize/dist/css/selectize.bootstrap3.css

.selectize-input > input {
  display: inline-block !important;
...

dimirc added a commit that referenced this issue Oct 29, 2014
Display placeholder when searchEnable is set to false #241
bereczdenes added a commit to IPSystems/ui-select that referenced this issue Nov 5, 2015
messo pushed a commit to IPSystems/ui-select that referenced this issue Feb 15, 2016
@wesleycho
Copy link
Contributor

Closing due to age of issue - feel free to open a new issue with reproduction based on the latest release if this is still a problem.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants