0

I Have used below line of code for multi selection. I am trying to multiselect on one entity but as soon as the scope is passed on to the next entity, the elements that I have selected in first entity gets unselected-

enter image description here

This is working fine on previous versions of chrome but not in 95.0

    1 Answer 1

    0

    This is breaking because you're setting ng-model to the same property that ng-options is using. So the moment you select something, abcDTO.SelectionTypes gets reset to whatever you selected. ng-options and ng-model should never be set to the same property. Has nothing to do with the Chrome version.

    Here's an example of it working once you change ng-model to something else.

    <select multiple="multiple" ng-multiple="true" rows="10" size="4" ng-model="abcDTO.Selection" ng-options="x.SelectionID as x.SelectionDesc for x in abcDTO.SelectionTypes"> </select> 
    2
    • I tried that also by binding the same to different objects but it did not work. Whereas this is working on Mozilla and IE but not in Chrome post the updateCommentedNov 17, 2021 at 8:12
    • @amarshubhanker I can take another look, but you will need to post a demo reproducing this issue. stackblitz.com/fork/angularjsCommentedNov 17, 2021 at 14:16

    Start asking to get answers

    Find the answer to your question by asking.

    Ask question

    Explore related questions

    See similar questions with these tags.