Skip to content

"x" buttons have same id in HTML DOM #315

Closed
@terrynguyen255

Description

@terrynguyen255

Describe the bug
"x" buttons have same id in HTML DOM.
The problem happens when every node has id property, when nodes have .id, "x" buttons stop using DropdownTreeSelect.props.id.

To Reproduce

  • Visit my codesandbox
  • Inspect the page, find for "button.tag-remove" (all buttons which's CSS class = "tag-remove")
  • Actual behavior: You will notice all found buttons have the same id="2_button"

Expected behavior
The buttons' ids should be different between different DropdownTreeSelects (like ${DropdownTreeSelect.props.id}_${node.id}_button).

image

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    stalewipWork In Progress

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions