Blox - Multi-Select Dropdown List Filter
Updated 02-28-2025
Hi Everyone,
Whoever is trying to attempt this BloX Multi-select option, do not import that data provided by Liliia_DevX, we have determined that the metadata carries over, so you must create the dashboard from scratch.
The BloX editor script:
{
"showCarousel": true,
"carouselAnimation": {
"delay": 0,
"showButtons": false
},
"style": "",
"script": "$('.c011 .action-set .action button').eq(0).mouseup(function(){ console.log('fire'); $('blox input:checked').parent().each(function(){ var values = $('.fillmeup').attr('value') + ',' + $(this).text(); $('.fillmeup').attr('value', values); }) })",
"body": [
{
"type": "ColumnSet",
"style": {},
"columns": [
{
"type": "Column",
"spacing": "extraLarge",
"width": "225px",
"items": [
{
"type": "Container",
"style": {
"justify-items": "center",
"align-items": "center"
},
"items": [
{
"type": "TextBlock",
"spacing": "large",
"id": "",
"class": "",
"text": "<div id='CategoryList' class='dropdown-check-list' tabindex='100'> <span class='anchor'>Select Category</span> <ul id='CategoryItems' class='items'>{panel:CategoryHTML}</ul> </div>"
}
]
}
]
},
{
"type": "Column",
"width": "100px",
"items": [
{
"type": "ActionSet",
"actions": [
{
"type": "MultiBoxSelection",
"title": "Apply",
"data": {
"dim": "[Category.Category]",
"title": "Category"
}
}
]
}
]
},
{
"type": "Column",
"width": "100px",
"items": [
{
"type": "ActionSet",
"actions": [
{
"type": "Filters",
"title": "Clear Filter",
"data": {
"filters": [
{
"filterName": "Category",
"filterJaql": {
"explicit": false,
"multiSelection": true,
"all": true
}
}
]
}
}
]
}
]
}
]
},
{
"type": "Input.Text",
"id": "data",
"class": "fillmeup",
"title": "New Input",
"placeholder": "Placeholder",
"style": {
"display": "none"
}
},
{
"type": "TextBlock",
"id": "",
"class": "",
"text": "<style>.dropdown-check-list { display: inline-block; } .dropdown-check-list .anchor { position: relative; cursor: pointer; display: inline-block; padding: 5px 50px 5px 10px; border: 1px solid #ccc; } .dropdown-check-list .anchor:after { position: absolute; content: ''; border-left: 2px solid black; border-top: 2px solid black; padding: 5px; right: 10px; top: 20%; -moz-transform: rotate(-135deg); -ms-transform: rotate(-135deg); -o-transform: rotate(-135deg); -webkit-transform: rotate(-135deg); transform: rotate(-135deg); } .dropdown-check-list .anchor:active:after { right: 8px; top: 21%; } .dropdown-check-list ul.items { padding: 2px; display: none; margin: 0; border: 1px solid #ccc; border-top: none; } .dropdown-check-list ul.items li { list-style: none; }</style>"
}
],
"actions": []
}
Then you can add the Action button to your env., the dashboard script, and then it should work.