-
-
Notifications
You must be signed in to change notification settings - Fork 902
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
addTag adding a object instead a string #809
Comments
Which version you are using? Also create reproducible example |
I have the "problem" with any version > 2.0.0. |
I have this as well. As a temporary fix I used the addTag method as follows:
and in component.ts:
|
This would be required for it to work |
-Can I ask how to customize the label and value of newly tag? Because when using addTag(tag: string) function above, the label and value is the same. I need to customize the value (increasing number for example) but still keep the label from insert -I also try:
The error is: get the label from newOpt, but the value is still an object {label: 'awsd-new', value: 'awsd'} |
Describe the bug
I don't using
bindValue
andbindLabel
properties, but when the tag is added, it gets the format:{ "label": "dsadas" }
<ng-select [items]="simpleItems" [(ngModel)]="selectedSimpleItem" [multiple]="true" [addTag]="true"></ng-select>
This problem does not occur in versions 1.x or 2.0.0.
Expected behavior
When you do not use binds, the value added is just a string.
The text was updated successfully, but these errors were encountered: