Ngx-chips: Transform is not triggered after item is added

Created on 15 Mar 2017  路  5Comments  路  Source: Gbuomprisco/ngx-chips

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}`;
}
bug

All 5 comments

It does happen when adding items using the autocomplete

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

EnochGao picture EnochGao  路  4Comments

Shinzah picture Shinzah  路  3Comments

lukas-bernert picture lukas-bernert  路  4Comments

matthewerwin picture matthewerwin  路  5Comments

RaghulXander picture RaghulXander  路  3Comments