Hello ,
Yes , you can achieve this by following below mentioned steps.
-
Open the dashboard in the edit mode and right click on empty space of the dashboard. Now select Advance Options and in that go to JS section.
-
Paste the below code in the js section
setTimeout(() => {
var filterBtnEl = document.querySelector('.hi-report-viewer-menu > li:nth-child(2)');
if (filterBtnEl) {
filterBtnEl.addEventListener('click', () => {
console.log('Button is clicked');
setTimeout(() => {
var filterContainers = document.querySelectorAll('.ant-drawer-body .ant-table-tbody tr');
filterContainers.forEach(item => {
var filterBodyEl = item.querySelector('.ant-card-body div');
if (filterBodyEl == null) {
var cursorPointerEl = item.querySelector('.cursor-pointer');
if (cursorPointerEl) {
cursorPointerEl.click();
console.log('Clicked the .cursor-pointer element');
}
}
});
}, 500);
});
} else {
console.log('Filter button not found!');
}
}, 1000);
- Click on apply button and save the dashboard.
- Now when ever you open the filter menu all the filters by default will be in expanded state.
Thank You.