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

Multiselect issue with ng-show initialised to false [Quick fix and demo inside] #214

Closed
laguiz opened this issue Sep 23, 2014 · 5 comments
Closed

Comments

@laguiz
Copy link

laguiz commented Sep 23, 2014

If an ui-select multiple is initialised with ng-show="false" then input placeholder width is set to 0.

Based on version 0.7.0 - 2014-09-09T01:02:43.608Z

Demo bugged version : http://plnkr.co/edit/Cv1NI0MkUP7ZFX2Ravqv?p=preview
Demo quick fixed version : http://plnkr.co/edit/YCMF0CEb0Xs4rIsTDNsq?p=preview

To summarised it's 2 lines of code to ensure that the minimum with it not 0. However if the ng-model array (here colors) is not empty when init then the initialised width is too big and it creates a new line instead of proper sized placeholder. Not sure how to do better to avoid conflict with ng-show.

Should I create a pull request?

@laguiz laguiz changed the title [Quick fix inside] Multiselect issue with ng-show initialised to false Multiselect issue with ng-show initialised to false [Quick fix and demo inside] Sep 23, 2014
@henrik-m
Copy link

This is the same issue as #212

@laguiz
Copy link
Author

laguiz commented Sep 26, 2014

Oups sorry for duplicates then.

@jjm340
Copy link

jjm340 commented Nov 12, 2015

Which two lines of code? It's not obvious from your demo...

@prakhar-goel
Copy link

try using ng-if instead of ng-show. It solved for me.

@wesleycho
Copy link
Contributor

Closing as duplicate of #212

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

5 participants