This repository was archived by the owner on Sep 5, 2024. It is now read-only.
This repository was archived by the owner on Sep 5, 2024. It is now read-only.
Md-chips allows duplicate objects #4466
Closed
Description
Md-chips currently doesn't allow duplicate strings, but will happily allow duplicate objects.
MdChipsCtrl.prototype.appendChip checks for duplicates with indexOf and because of that only duplicate strings and duplicate items referencing the same object are removed.
Because of that I often find myself writing md-on-append function to check for myself if objects are the same.
Solution would be to check if $chip is an object and use angular.Equals()? or to allow user to specify expression used to check for duplicates.