question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

onTagEdited not firing?

See original GitHub issue

I’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:open
  • Created 5 years ago
  • Reactions:1
  • Comments:22 (5 by maintainers)

github_iconTop GitHub Comments

6reactions
jsalvatacommented, Jun 1, 2018

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.

3reactions
anmoliocommented, Feb 25, 2020

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!

Read more comments on GitHub >

github_iconTop Results From Across the Web

ngx-chips (ng2) tag input component custom theme not working
Ok I get the new ark-tag-theme class at the initial div of the component but everything else still reads the setup bootstrap3 and...
Read more >
Email Feature in Angular(using ngx-chips and angular-editor)
It must have 'identifyBy' and 'displayBy' property. 'FormControl' can also be used in substitution when working with reactive forms. 2- ...
Read more >
ngx-chips - npm
Notice: the latest version on NPM may not reflect the branch ... Event fired when the input is focused - will return current...
Read more >
ng2-tag-input - Bountysource
[ngx-chips] Not able to edit chips on safari browser and ... onTagEdited not firing? $ 0 ... I have a tag-input with (onTagEdited)="onTagEdited($event)"...
Read more >
Tagify - Tags input Component - GitHub Pages
As text is typed, the onInput Tagify event is fired, on each key stroke. ... the field is pre-ocupied with 3 tags, and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found