onTagEdited not firing?
See original GitHub issueI’m submitting a … (check one with “x”)
[x] bug report => search github for a similar issue or PR before submitting
[ ] support request/question
Notice: feature requests will be ignored, submit a PR if you'd like
Current behavior
I have a tag-input
with (onTagEdited)="onTagEdited($event)"
. I double click on a tag, make changes, and the tag automatically reverts back to the old value.
Expected behavior
I expect the onTagEdited
event to fire and the tag to be renamed.
Minimal reproduction of the problem with instructions (if applicable)
What do you use to build your app?. Please specify the version
"@angular/cli": "^1.7.3"
Angular version:
"@angular/animations": "^5.2.9",
"@angular/cdk": "^5.2.4",
"@angular/common": "^5.2.9",
"@angular/compiler": "^5.2.9",
"@angular/core": "^5.2.9",
"@angular/forms": "^5.2.9",
"@angular/http": "^5.2.9",
"@angular/material": "^5.2.4",
"@angular/material-moment-adapter": "^5.2.4",
"@angular/platform-browser": "^5.2.9",
"@angular/platform-browser-dynamic": "^5.2.9",
"@angular/router": "^5.2.9",
ngx-chips version:
"ngx-chips": "^1.7.7"
Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]
Chrome 67.0.3389.0 (Official build) canary (64-bits)
Firefox Quantum 59.0.2 (64-bits)
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:22 (5 by maintainers)
I’ve been suffering a bug which I believe is this same one: when using identifiers (different from the display strings) and a tag is edited, it is always found to be a duplicate of itself and the edit is undone.
One solution would be to skip duplicate checking when editing tags, since
allowDupes
is defined to “tags with the same value” – so tags with the same display string should always be allowed.The right solution for me, however, is to just check for duplicate display strings – since that’s what I want to avoid duplicating.
If you are using different values for [identifyBy] & [displayBy] ; once you edited the tag and enter the changes will be undone; using the same display and identify values will make it work!