myforce / angularjs-dropdown-multiselect

AngularJS Dropdown Multiselect
http://myforce.github.io/angularjs-dropdown-multiselect/
MIT License
34 stars 28 forks source link

Code is ignoring settings #48

Open MissingLinke-zz opened 7 years ago

MissingLinke-zz commented 7 years ago

I have the js: $scope.example7settings = { "externalIdProp": '' };

and the HTML: <div ng-dropdown-multiselect="" options="example7data" selected-model="example7model" extra-settings="example7settings"></div>

But when I run the code and display {example7model}} I get: [{"id":1}]

If I debug the code and go to the function `$scope.setSelectedItem = function(id, dontRemove, fireSelectionChange) { var findObj = getFindObj(id); var finalObj = null;

                if ($scope.settings.externalIdProp === '') {
                    finalObj = find($scope.options, findObj);
                } else {
                    finalObj = findObj;
                }`

I can see that $scope.settings.externalIdProp is now 'Id' again. So somewhere it seems to be setting the settings back to the default. I've not tested them all, but I also saw this same issue in displayProp, idProp, scrollableHeight and scrollable