Thanks to visit codestin.com
Credit goes to github.com

Skip to content

ng-change fired twice? #59

Open
Open
@AnimaLupi

Description

@AnimaLupi

Hello, I'm trying to use ng-change with this directive.

I've noticed that from time to time the ng-change callback gets called twice.

I think this happens when the newly selected option is being added among the selected ones and that triggers a reordering of the array (i.e. the newly selected option gets inserted in the middle or the start of the selected options).

The model is first updated with the newly selected option at the end (1st on-change), then it's sorted to proper order (2nd on-change).

Thank you,

Andrea

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions