question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ng-modal is not working when used with ng-options and group by.

See original GitHub issue

Hi, There is no modal change (I have tried using $watch to verify any modal change).

The following code:

<select name="selectedCard" chosen class="chosen-select" style="width:250px;"
                    disable-search="true"
                    ng-if="showMultiCardNavBar()" ng-model="selectedCard" ng-change="cardSelected()"
                    ng-options="card.id as card.id group by getGroupByName(card.cardGroupId)  for card in cardsContext" >
                <option value=""></option>
            </select>

there is no change on this property: selectedCard.

Had to do a workaround to query the DOM object and find the chosen-selected taged element.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:14 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
thelastinuitcommented, Oct 17, 2016

The same here @leocaseiro the ng-model is not being updated.

1reaction
dkokiccommented, Feb 27, 2017

Thanks a million @leocaseiro

Read more comments on GitHub >

github_iconTop Results From Across the Web

ng-model not working propertly with ng-options and array
It worked fine when I was using ng-repeat inside option tag's but then the first value were blank so I've started using ng-options...
Read more >
Angular ng-options Directive - W3Schools
The ng-options directive uses an array to fill the dropdown list. In many cases it would be easier to use the ng-repeat directive,...
Read more >
ngOptions - AngularJS: API
By default, ngModel watches the model by reference, not value. This is important to know when binding the select to a model that...
Read more >
Select inside ng-repeat with ng-options and ng-model
The problem is the ng-model, as this is set to items[0] (Client Script) it never gets updated, I have been looking at getterSetter...
Read more >
Angular ng-select - npm
Start using @ng-select/ng-select in your project by running `npm i ... <ng-select [(ngModel)]="selectedCar"> <ng-option *ngFor="let car of ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found