Skip to content
This repository has been archived by the owner on Oct 7, 2020. It is now read-only.

[list] Automatic generated id #2265

Open
AndreKoepke opened this issue May 18, 2020 · 0 comments
Open

[list] Automatic generated id #2265

AndreKoepke opened this issue May 18, 2020 · 0 comments

Comments

@AndreKoepke
Copy link

Describe the bug
The mdc-list and the underlaying mdc-list-items getting automatic a id. Even when the id is manually provided.
The id is in this schema <componet-name>-<n> - so if we have a two lists like this ...

list1 (#mdc-list-1)
 |--> item1 (#mdc-list-item-1)
 |--> item2 (#mdc-list-item-2)
list2 (#mdc-list-2)
 |--> item1 (#mdc-list-item-3)
 |--> item2  (#mdc-list-item-4)

Then the id's a automatic set somewhere. It doesn't matter if we set a id manually (with one variant of <mdc-list-item id="test" [id]="'test'" [attr.id]="'test'" ...), there is always the generated id.

To Reproduce
Steps to reproduce the behavior:

  1. Setup a list and inspect the id's.

Expected behavior
If a id was set manually, then it never gets overwritten.
Otherwise it is really hard to write test-cases for e2e in a big project, when the id`s "randomly" changed.

Screenshots
It seems, that the behaviour is also on the examples.
image

What Angular MDC version are you using? 5.1.1

What OS are you using?: Linux and Windows

What browser(s) is this bug affecting?: Chrome and Firefox

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant