Skip to content

Commit

Permalink
Fix for issue - single select - button text is not mapped correctly t…
Browse files Browse the repository at this point in the history
…o the string modal value amitava82#95

Possible fix for issue - Show only one property but select complete object amitava82#92

File changed - multiselect.js

Changes made -
Calling the function getItemLabel(items,model) in function getHeaderText()
  • Loading branch information
NithinBiliya committed Nov 22, 2016
1 parent 17cd08b commit 814dd19
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dist/multiselect.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ angular.module('am.multiselect', [])
} else {
var local = {};
local[parsedResult.itemName] = modelCtrl.$modelValue;
scope.header = parsedResult.viewMapper(local) || scope.items[modelCtrl.$modelValue].label;
scope.header = parsedResult.viewMapper(local) || getItemLabel(scope.items,modelCtrl.$modelValue);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/multiselect.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ angular.module('am.multiselect', [])
} else {
var local = {};
local[parsedResult.itemName] = modelCtrl.$modelValue;
scope.header = parsedResult.viewMapper(local) || scope.items[modelCtrl.$modelValue].label;
scope.header = parsedResult.viewMapper(local) || getItemLabel(scope.items,modelCtrl.$modelValue);
}
}
}
Expand Down

0 comments on commit 814dd19

Please sign in to comment.