Skip to content
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
@moog16

Description

@moog16

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Unresolved (Archived)Open and unresolved issues and PRs that were closed due to archiving the repository.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions