I have an issue where the transform is not triggered when I'm adding new item. See the code below, I don't even see the console.log fired.. Ideas ? Could it be a combination of all different features used? v. 0.9.6
.html
<tag-input [ngModel]="role.users" id="roleUsers" name="roleUsers" #roleUsers="ngModel"
[onlyFromAutocomplete]="true"
[placeholder]="'Add a user'"
[secondaryPlaceholder]="'Add a user'"
(onAdd)="addUser($event, i)"
(onRemove)="removeUser($event, i)"
[transform]="transform">
<tag-input-dropdown
[autocompleteObservable]="requestAutocompleteItems"
[autocompleteItems]="userAutocompleteItems">
<template let-item="item" let-index="index">
{{ item.display }}
</template>
</tag-input-dropdown>
</tag-input>
.js
public transform(item: string): string {
console.log("in transformer: ",item);
return `@${item}`;
}
It does happen when adding items using the autocomplete
Will be fixed in https://github.com/Gbuomprisco/ng2-tag-input/pull/275
Hi @admix,
version 0.9.8 should address this. Let me know :)
Awesome @Gbuomprisco , I will have a look and let you know. Thanks!
Seems like its working great now. Thanks @Gbuomprisco