12-17-2018 02:48
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

12-17-2018 02:48
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
How to make a single selection Virtual Tile List?
12-17-2018 03:17 - edited 12-17-2018 03:18
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


12-17-2018 03:17 - edited 12-17-2018 03:18
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Can you elaborate on what you need? Are you trying to click a tile list item, then show a detail view? or do you mean like a list of radio buttons?

12-17-2018 03:27
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

12-17-2018 03:27
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
I want it to be like a radio button.

12-17-2018 03:49
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


12-17-2018 03:49
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
If you follow the checkbox list example, you can deselect the other items like this:
import document from "document"; let tileList = document.getElementById("tile-list"); let tileItems = tileList.getElementsByClassName("tile-item"); let tileState = {} tileItems.forEach((element, index) => { tileState[index] = element.firstChild.value; // initial state element.firstChild.onclick = (evt) => { tileState[index] = !tileState[index]; uncheckAllExceptSelected(index); console.log(`item ${index} :: ${tileState[index] ? "checked" : "unchecked"}`) }; }); function uncheckAllExceptSelected(selected) { tileItems.forEach((element, index) => { if (index !== selected) { tileState[index] = false; element.firstChild.value = 0; } }); }
12-17-2018 06:19
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

12-17-2018 06:19
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
@JonFitbit Is it possible to implement the radio button functionality in dynamic(virtual tile list) also, as per your comment its working fine static tile-list. Thanks in advance.

12-19-2018 06:40
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

12-19-2018 06:40
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Your solution working fine with static tile-list.
Please provide the solution for virtual-tile-list

