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

search-enabled="false" hides the input box with associated placeholder #691

Closed
mjhamm75 opened this issue Feb 19, 2015 · 3 comments · Fixed by #1717
Closed

search-enabled="false" hides the input box with associated placeholder #691

mjhamm75 opened this issue Feb 19, 2015 · 3 comments · Fixed by #1717

Comments

@mjhamm75
Copy link

When I set search-enabled="false", my input box and associated placeholder disappear. This also affects CSS that may be attached to the input box as well. My suggested fix is to move the !$select.searchEnabled logic from the ng-hide to the ng-disabled for that input box (see below):

$templateCache.put("selectize/select.tpl.html","<div class="ui-select-container selectize-control single" ng-class="{'open': $select.open}"><div class="selectize-input" ng-class="{'focus': $select.open, 'disabled': $select.disabled, 'selectize-focus' : $select.focus}" ng-click="$select.activate()"><div class="ui-select-match"><input type="text" autocomplete="off" tabindex="-1" class="ui-select-search ui-select-toggle" ng-click="$select.toggle($event)" placeholder="{{$select.placeholder}}" ng-model="$select.search" ng-hide="($select.selected && !$select.open)" ng-disabled="$select.disabled || !$select.searchEnabled" aria-label="{{ $select.baseTitle }}"><div class="ui-select-choices">");}]);

@michaelmalone
Copy link

I am experiencing the same issue.

@Patrik-Lundqvist
Copy link

This seems related to #453, where a pull request is waiting

@rolivares
Copy link

Same here ... waiting for commit :(

user378230 added a commit to user378230/ui-select that referenced this issue Jul 10, 2016
Previously when searchEnabled was set to false, the placeholder would
also be hidden on the selectize theme.

This fix sets the search input to disabled rather then hidden when the
searchEnabled attribute is set to false.

Fixes angular-ui#949 and angular-ui#691
user378230 pushed a commit to user378230/ui-select that referenced this issue Jul 10, 2016
Previously when searchEnabled was set to false, the placeholder would
also be hidden on the selectize theme.

This fix sets the search input to disabled rather then hidden when the
searchEnabled attribute is set to false.

Fixes angular-ui#949 and angular-ui#691
@user378230 user378230 self-assigned this Jul 10, 2016
user378230 added a commit to user378230/ui-select that referenced this issue Jul 10, 2016
Previously when searchEnabled was set to false, the placeholder would
also be hidden on the selectize theme.

This fix sets the search input to disabled rather then hidden when the
searchEnabled attribute is set to false.

Fixes angular-ui#1145, fixes angular-ui#949, fixes angular-ui#691
aaronroberson pushed a commit that referenced this issue Aug 7, 2016
* fix(searchEnabled): maintain keyboard nagivation

Fix issue where keyboard navigation was disabled when searchEnabled
was set to false.

Caused by hiding the input box which prevent key events from
propagating to the directive.

Resolved hiding the input offscreen when searchEnabled is false.

Fixes #1059, fixes #917, fixes #589, fixes #375
Closes #1543, closes #1114, closes #1109 (supersedes all)

* fix(selectize): show placeholder when search disabled

Previously when searchEnabled was set to false, the placeholder would
also be hidden on the selectize theme.

This fix sets the search input to disabled rather then hidden when the
searchEnabled attribute is set to false.

Fixes #1145, fixes #949, fixes #691

* fix(searchEnabled): Prevent searching when disabled

Previously, even when search-enabled was set to false, users could
still type in text and filter the list. This made disabling the search
feature pointless.

This fix prevents text entry to the search input and thus disables
filtering.

Fixes #1658
kboga pushed a commit to kboga/ui-select that referenced this issue Nov 29, 2016
* fix(searchEnabled): maintain keyboard nagivation

Fix issue where keyboard navigation was disabled when searchEnabled
was set to false.

Caused by hiding the input box which prevent key events from
propagating to the directive.

Resolved hiding the input offscreen when searchEnabled is false.

Fixes angular-ui#1059, fixes angular-ui#917, fixes angular-ui#589, fixes angular-ui#375
Closes angular-ui#1543, closes angular-ui#1114, closes angular-ui#1109 (supersedes all)

* fix(selectize): show placeholder when search disabled

Previously when searchEnabled was set to false, the placeholder would
also be hidden on the selectize theme.

This fix sets the search input to disabled rather then hidden when the
searchEnabled attribute is set to false.

Fixes angular-ui#1145, fixes angular-ui#949, fixes angular-ui#691

* fix(searchEnabled): Prevent searching when disabled

Previously, even when search-enabled was set to false, users could
still type in text and filter the list. This made disabling the search
feature pointless.

This fix prevents text entry to the search input and thus disables
filtering.

Fixes angular-ui#1658
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants