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.

Unable to change the attribute "id" on the parent div-element

See original GitHub issue

First of all: thank you for a very useful component!

  • vue-autosuggest version: 1.4.3
  • node version: 10.5.0
  • npm (or yarn) version: 6.2.0

Relevant code or config

  data: () => ({
    component_attr_id_autosuggest: "autosuggest",
    component_attr_class_autosuggest__results_container: "autosuggest__results-container",
    component_attr_class_autosuggest__results: "autosuggest__results",

Problem description: At the moment it is not possible to use a own ‘id’ for the parent div, because it is a fixed value in the data attributes. So if you add two vue-autosuggest fields on one page, you have a id duplication.

Suggested solution: Add the possibility to set a own ‘id’ for the parent div and it whould be nice to have maybe a class on the parent div to have a better styling possibility.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
djzaracommented, Sep 12, 2018

Sorry for the irrelevant(ish) comment, but I did want to say super grats on the baby 😃 it’s a wonderful experience!!

1reaction
darrenjenningscommented, Sep 12, 2018

@djzara I requested changes on the PR but they have not been addressed yet. I will try and get to it in the next week or so and just make the changes myself. Sorry it can’t be sooner, just had a baby so haven’t had as much time to devote! Stay tuned…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Getting the parent div of element - javascript - Stack Overflow
The property pDoc.parentElement or pDoc.parentNode will get you the parent element.
Read more >
Lesson 1: Understanding ID and Class in CSS
In this lesson you will learn how ID and Class attributes can be used to stylize individual elements (id) or groups of elements...
Read more >
Document.getElementById() - Web APIs | MDN
The Document method getElementById() returns an Element object representing the element whose id property matches the specified string.
Read more >
Selectors - W3C
A simple selector is either a type selector or universal selector followed immediately by zero or more attribute selectors, ID selectors, or pseudo-classes, ......
Read more >
Documentation - DOM Manipulation - TypeScript
The DOM API can be used to change the document structure, style, and content. The API is so powerful that ... Select the...
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