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

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

Open
JivanRoquet opened this issue Mar 25, 2020 · 0 comments
Open

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

JivanRoquet opened this issue Mar 25, 2020 · 0 comments

Comments

@JivanRoquet
Copy link

JivanRoquet commented Mar 25, 2020

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" }
}
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants