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.

Found 9 elements with non-unique id

See original GitHub issue

I’m submitting a … (check one with “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

<tag-input id="{{item.name}}"  [theme]="'bootstrap'" [secondaryPlaceholder]="'(after add press enter)'" [attr.required]="item.required" [ripple]="false" [(ngModel)]="dropdownDataSelectOptions[item.holderId]"  [theme]="'bootstrap'" [maxItems]="1"  [identifyBy]="'id'" [onlyFromAutocomplete]="false">
                        <tag-input-dropdown id="{{item.name}}" [showDropdownIfEmpty]="true"
                            [focusFirstElement]="true"
                            [displayBy]="'value'"
                            [identifyBy]="item.name"
                            [autocompleteItems]="dropdownData[item.holderId]">
                              <ng-template let-item="item" let-index="index">
                              {{ item.value }}
                          </ng-template>
                      </tag-input-dropdown>
                    </tag-input>

Expected behavior

Works as expected, everything is working. The only issue is in the browser I am getting Found 9 elements with non-unique id # error this is because I am looping through an array and adding the tag-input. I have tried adding name and id property but some how its not working.

Minimal reproduction of the problem with instructions (if applicable)

What do you use to build your app?. Please specify the version

Webpack

Angular version:

Angular 5

ngx-chips version:

latest

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

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
Gbuompriscocommented, Mar 10, 2018

Try [inputId]=“item.name” on <tag-input>

0reactions
dholakiyaankitcommented, Mar 10, 2018

[inputId]="item.name" works

Read more comments on GitHub >

github_iconTop Results From Across the Web

Found 2 elements with non-unique id - Stack Overflow
as ID must be unique in the DOM. It will create conflict when you want to select elements using document.getElementById('Job_Name') or using ...
Read more >
Warning: [DOM] Found 4 elements with non-unique id
Hi Sagar,. This is happening due to the forms fields having the same default name and they, unfortunately, repeat in different forms at...
Read more >
[DOM] Found 2 elements with non-unique id #: · Issue #599
It seems that the problem isn't into the component, is a html bug ? Expected behaviour. Maybe input elements should have a generated...
Read more >
Found 2 elements with non-unique id. Loading the selected ...
I have an option select tag where a user picks the option they want on a drop down. Copy Code <div class="button dropdown">...
Read more >
[Resolved] Error: Found 2 elements with non-unique id - Toolset
Hello my console shows the following errors: (see also screenshot) Found 2 elements with non-unique id #cred_form_216_1-button-2-1517153464: (More info:
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