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.

[Bug Report] v-slider generates duplicate element id's

See original GitHub issue

Versions and Environment

Vuetify: 1.5.7 Vue: 2.6.10 Browsers: Chrome 73.0.3683.86 OS: Mac OS 10.14.3

Steps to reproduce

  1. Use a Vuetify v-slider component with a custom id
  2. See the generated HTML (both the container div and the input elements have the same id)

Expected Behavior

Each element should have a unique id, if both container and input elements need an id there could be a container-id similar to the suggested solution in #2777. Otherwise the id could be auto-generated with container appended or only the input should have the id. (probably best to stay consistent with other form controls)

<v-slider
   id="slider-input-id"
   container-id="slider-container-id"
   v-model="slider"
></v-slider>

Actual Behavior

<v-slider
   id="slider-id"
   v-model="slider"
></v-slider>

Also see the HTML output on this demo

Reproduction Link

https://codepen.io/robinvenneman/pen/RdmwOa

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:9
  • Comments:10 (1 by maintainers)

github_iconTop GitHub Comments

5reactions
radckicommented, Dec 22, 2019

id’s are generated here: https://github.com/vuetifyjs/vuetify/blob/30632ab56f6215f66cdecd06f35b5fee9ab7faef/packages/vuetify/src/components/VInput/VInput.ts#L81 so it seems that Vue’s _uid is not unique enough for this component.

maybe change from computedId (): string { return this.id || `input-${this._uid}` }, to computedId (): string { return this.id || `input-${this._uid}+${Math.ceil(Math.random()*1000)}` }, would be enough?

3reactions
paul-a-byfordcommented, Feb 1, 2020

i’m also experiencing this error message, is there a work around or fix planned?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Sync Report error: Records not processed due to duplicate IDs
Sync Report error: Records not processed due to duplicate IDs ... Clever requires a unique ID for every record we process, and each...
Read more >
Is it possible to debug for duplicate Ids? - Stack Overflow
It's most likely a <h:column> or <rich:column> . Quick way to find out the exact component is findComponent() : UIComponent component = context....
Read more >
How to resolve Duplicated Id error "Duplicate Persistent ... - PTC
How to resolve Duplicated Id error "Duplicate Persistent ID for element named/Duplicate ID is generated from source. This ID already belongs to ...
Read more >
How to Fix in R: Error: Duplicate identifiers for rows - Statology
This tutorial explains how to fix the following error in R: Error: Duplicate identifiers for rows.
Read more >
EMC: Reporting shows duplicate queues and ... - Avaya Support
If the wrong one is selected, or is part of a list of selections, it will cause the report to generate a "No...
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