Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Search Box not enabled in the dropdown #34

Open
sanktify opened this issue Oct 26, 2016 · 4 comments
Open

Search Box not enabled in the dropdown #34

sanktify opened this issue Oct 26, 2016 · 4 comments

Comments

@sanktify
Copy link

sanktify commented Oct 26, 2016

Code used in the Index.html:
<select chosen options="countries" data-placeholder="Choose a Country..." data-ng-model="country.selected" data-ng-options="country.text for country in countries" data-ng-show="showEditProfile"></select>

The Steps followed:

  1. Files included as per the article
  2. ['angular.chosen'] added as a dependency in the module.

The countries list is populated from the WebAPI and its working fine till now. I am not able to get the search box, could you please help.

Browsers used:

  1. Chrome
  2. IE-11
  3. Firefox
@sanktify sanktify changed the title Search Box not coming in the dropdown Search Box not enabled in the dropdown Oct 26, 2016
@adityasharat
Copy link
Owner

Can you check if there are any exceptions in the console and please share the countries array.

@sanktify
Copy link
Author

sanktify commented Oct 27, 2016

There is no exception in the console.

The countries array in the scope looks like this when filled from the WebAPI call:

countries:Array[247]
[0 … 99]
0:Object
text:"Andorra"
value:"AD"
proto:Object
1:Object
text:"United Arab Emirates"
value:"AE"
proto:Object
2:Object
text:"Afghanistan"
value:"AF"
proto:Object

......._

The scenario is such that, on page load the countries are populated in the array, when i click on the a button the country dropdown is enabled and displayed. When the dropdown enables, the list is populated correctly but the search box fails to show.

@adityasharat
Copy link
Owner

Everything seems to be in order. It would be extremely helpful if you could share a fiddle.
Also, do mention the version of angular you are using. This may not be an issue with chosen. Unsure though

@sanktify
Copy link
Author

sanktify commented Nov 1, 2016

It worked with another tool similar to chosen and it was also in angular. i will try making a fiddle and sending it across to you.
Using the latest version of angular from the google library.

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

No branches or pull requests

2 participants