Unable to change the attribute "id" on the parent div-element
See original GitHub issueFirst of all: thank you for a very useful component!
vue-autosuggest
version: 1.4.3node
version: 10.5.0npm
(oryarn
) 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:
- Created 5 years ago
- Reactions:1
- Comments:5 (3 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Sorry for the irrelevant(ish) comment, but I did want to say super grats on the baby 😃 it’s a wonderful experience!!
@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…