bpeikes
01-18-2023Cloud Apps
Blox dropdown?
Trying to follow the documentation on how to create a simple DropDown. I don't even want it dynamic (for now), but the documentation (https://docs.sisense.com/main/SisenseLinux/sisense-blox-reference...
This isn't true though. I have a concrete example, this works:
{
"type": "Input.ChoiceSet",
"displayType": "compact",
"backgroundColor": "#282c36",
"choices": [
{
"title": "(Any)",
"value": ""
},
{
"title": "Item1",
"value": "Item1"
},
{
"title": "Item2",
"value": "Item2"
}
]
}
And this renders as a set of radio buttons:
{
"type": "Input.ChoiceSet",
"id":"selectVal",
"backgroundColor": "#282c36",
"choices": [
{
"title": "(Any)",
"value": ""
},
{
"title": "Item1",
"value": "Item1"
},
{
"title": "Item2",
"value": "Item2"
}
]
}Oh, I get where I caused confusion. Apologies
I was only talking about adding/changing the formatting of the box that is there, and for that the 'id' attribute is required because the styling is set it.
However, to get the dropdown, you *do* need the 'displaytype:compact' attribute (and that very much needs to be documented). But to format the resulting box, you need the style formatting at the top of the blox code, with the snippet that *has* the displaytype:compact, also having the id that you specify at the top (in the example case, selectVal).
Good Luck!Iris
Yeah, the documentation is completely misleading. Spent several hours figuring out how to do a drop down. On top of that, the fact that sometimes attributes can be specified on the object, and sometimes on the style is completely frustrating.
It feels like the documentation was written by someone who doesn’t know how the product works.