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

solution for issue #1059 when searchEnabled is false. #1114

Closed
wants to merge 3 commits into from
Closed

solution for issue #1059 when searchEnabled is false. #1114

wants to merge 3 commits into from

Conversation

cbryer
Copy link

@cbryer cbryer commented Jul 29, 2015

when the search-enabled option on the ui-select directive is false the up, down and tab keys dont work. this was because there was an ng-show="$select.searchEnabled" on the search input. This change removes the ng-show and applies a css class to hide the search box using opacity and height styles. Karma tests were updated and the following plunks demonstrate the changes.

previous:
http://plnkr.co/edit/zO8VFUUJTPnTRRh7u8kU?p=preview

with my changes:
http://plnkr.co/edit/3UpySUyaqi8fCbwB2OMi?p=preview

@dimirc
Copy link
Contributor

dimirc commented Jul 31, 2015

Could you remove /dist files from this commit?
Also can you add changes from #1109 to avoid bootstrap theme to look weird?

@cdjackson
Copy link
Contributor

Just FYI, I've done a similar change in #1109 for the bootstrap theme. I used the existing 'offscreen' class to move the search box off screen but still allow the focus to be set. This avoided adding yet more classes to the css...

@cbryer
Copy link
Author

cbryer commented Aug 4, 2015

I merged #1109 into this pull request. I liked the idea of using offscreen class however selectize didnt render nicely and select2 theme needed the class applied to a containing div instead of the search input so i opted to keep the new css class and remove the code from the controller in #1109 that added the class directly to the input.

@cbryer
Copy link
Author

cbryer commented Aug 12, 2015

is there anything else i should do for this pull request to get accepted?

fcaballero added a commit to fcaballero/ui-select that referenced this pull request Mar 30, 2016
fcaballero added a commit to fcaballero/ui-select that referenced this pull request Apr 25, 2016
…bled is false

Closes angular-ui#375 PRs angular-ui#1114 and angular-ui#1109

fix(indentation)  use 2 spaces, add white-space
user378230 pushed a commit to user378230/ui-select that referenced this pull request Jul 10, 2016
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)
aaronroberson pushed a commit that referenced this pull request 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 pull request 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 this pull request may close these issues.

4 participants