Skip to content
This repository was archived by the owner on Jan 14, 2025. It is now read-only.

MDC Web v1 Update List issue with classes/attributes #768

Closed
moog16 opened this issue Mar 23, 2019 · 0 comments
Closed

MDC Web v1 Update List issue with classes/attributes #768

moog16 opened this issue Mar 23, 2019 · 0 comments
Labels
Unresolved (Archived) Open and unresolved issues and PRs that were closed due to archiving the repository.

Comments

@moog16
Copy link

moog16 commented Mar 23, 2019

related #697

The list update has been merged into feat/mdcweb-typescript-update branch. This version has a bug that has issues with tracking the className and attributes.

Steps to reproduce:

  1. start screenshot tests
  2. go to list screenshot test
  3. click on selected list item (first list)
  4. click on selected list item again (first list)

result: list item is unselected. In MDC Web, the list remains selected.

This is happening because addClassForElementIndex adds the className to the element.classList. The way the List passes classes to the ListItem is via props. Since the classList isn't on props, we lose the added class. This is the same for attributes such as aria-hidden.

Possible fix is to bring back listItemAttributes: {[N: number]: any}; and listItemClassNames: {[N: number]: string[]};, but this will most likely bring back issue #763.

@asyncLiz asyncLiz added the Unresolved (Archived) Open and unresolved issues and PRs that were closed due to archiving the repository. label Jan 14, 2025
@asyncLiz asyncLiz closed this as not planned Won't fix, can't repro, duplicate, stale Jan 14, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Unresolved (Archived) Open and unresolved issues and PRs that were closed due to archiving the repository.
Projects
None yet
Development

No branches or pull requests

2 participants