This repository was archived by the owner on Jan 14, 2025. It is now read-only.
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 as not planned
Description
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:
- start screenshot tests
- go to list screenshot test
- click on selected list item (first list)
- 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.