Skip to content

ui.element.id is only reflected for some elements in HTML - what's the reason / concept? #4087

Closed Answered by falkoschindler
Alyxion asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @Alyxion,

Vue translates a Quasar components like QBtn into an HTML element <button> which receives all props like the id attribute. But, for reasons I don't fully understand, other components like QInput are translated into <label> without any user-defined props. The <input> element itself is nested somewhere within <label>, receives props, but the id attribute is randomly generated to match the for attribute of the <label> element.

See #3842 (comment) for reference:

Even worse, there is no guarantee that there will be an element in the DOM with the corresponding ID. Take ui.input for example: It gets translated into a <label> tag with several nested elements, none of which has an ID.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@Alyxion
Comment options

@falkoschindler
Comment options

@falkoschindler
Comment options

Answer selected by Alyxion
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants