rapidbisupport
04-11-2024Data Pipeline
Hibminehart ,
As DRay mentioned - not as convenient as having a solution OOTB - but at least a workaround you can try?
You could use a BloX control to do this, with a editor json as follows:
{
"style": "",
"script": "",
"title": "",
"showCarousel": true,
"body": [
{
"type": "Container",
"items": [
{
"type": "TextBlock",
"text": "<button id='reset_filters_button'> RESET ALL WIDGET FILTERS </button>",
"style": {
"text-align": "center",
"font-weight": "bold",
"font-size": "24px",
"margin": "100px"
}
}
]
}
],
"actions": []
}
and a dashboard script like this:
dashboard.on('domready', () => {
$('#reset_filters_button').on('click', () => {
debugger
let widgetCount = prism.activeDashboard.widgets.$$widgets.length
for (let i = 0; i < widgetCount; i++) {
let widget = prism.activeDashboard.widgets.$$widgets[i]
widget.metadata.panels.find((p) => { return p.name === 'filters' }).items.splice(0,widget.metadata.panels.find((p) => { return p.name === 'filters' }).items.length)
widget.metadata.ignore.ids = []
widget.changesMade('widget', 'filters')
widget.refresh()
}
})
})
Let me know how you go?
Thanks,
Daniel
RAPID BI
RAPID BI - Sisense Professional Services | Implementations | Custom Add-ons