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

ui-select multiple disabled state hides placeholder text incorrectly #1667

Closed
longzheng opened this issue Jun 16, 2016 · 3 comments · Fixed by #1744
Closed

ui-select multiple disabled state hides placeholder text incorrectly #1667

longzheng opened this issue Jun 16, 2016 · 3 comments · Fixed by #1744

Comments

@longzheng
Copy link

Bug description:

When using ui-select in multiple mode, if ui-select is disabled, the ui-select-match placeholder text is incorrectly hidden using ng-hide

Multiple, placeholder text, ui-select enabled
image

Multiple, placeholder text, ui-select disabled
image

This behavior works correctly for non-multiple ui-selects
image

Link to minimally-working plunker that reproduces the issue:

http://angular-ui.github.io/ui-select/demo-tagging.html

  • Clear values from input
  • Click on "Disable ui-select"
  • Actual: placeholder text disappears
  • Expected: placeholder text remains

Version of Angular, UI-Select, and Bootstrap/Select2/Selectize CSS

Angular: 1.5.0

UI-Select: 0.18.0

Fix

Remove this ng-hide from the select-multiple template https://github.com/angular-ui/ui-select/blob/master/src/bootstrap/select-multiple.tpl.html#L12

There is no equivelant ng-hide for the non-multiple select template https://github.com/angular-ui/ui-select/blob/master/src/bootstrap/select.tpl.html

@Jefiozie
Copy link
Contributor

I'm looking at your issue and #1156 has a similiar thing but here it was a CSS adjustment.
Do you agree that we need to make a adjustment that is the same for all themes?

@longzheng
Copy link
Author

I think overriding a ng-hide with CSS display: initial !important is more of a hack.

The fact that non multiple templates don't have the same ng-hide leads me to believe it is a mistake on the ng-hide.

@Jefiozie
Copy link
Contributor

Agree on that I will add my pr as I already had a commit.

user378230 pushed a commit that referenced this issue Jul 30, 2016
Ensure placeholder is still visible when select is disabled.

Closes #1667
kboga pushed a commit to kboga/ui-select that referenced this issue Nov 29, 2016
Ensure placeholder is still visible when select is disabled.

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

Successfully merging a pull request may close this issue.

2 participants