Skip to content
This repository was archived by the owner on Nov 30, 2022. It is now read-only.

Add class or attribute to inserted token <li> tag #77

@JivanRoquet

Description

@JivanRoquet

When selecting a value from the dropdown list, the inserted li tag is of the following form:

<li class="token" data-value="US">...</li>

Is it possible to add an additional class or attribute like the following:

<li class="token" data-value="US" data-continent="America">...</li>
<!-- or -->
<li class="token america" data-value="US">...</li>

Source data structure is as follows:

data = [
  { value: "US", text: "United States", continent: "America" },
  { value: "FR", text: "France", continent: "Europe" },
  { value: "JP", text: "Japan", continent: "Asia" }
}

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions