Tuesday, August 30, 2016

Fix Interactive Report headers issue when using a Region Display Selector

When you have multiple Interactive Reports (IR) on your page and use a Region Display Selector to mimic tabs, you might notice some weird behaviour in the IR headings if you switch tabs. The headings are not positioned correctly and you get an extra empty row under the headings. It just looks weird and ugly. But if you resize your browser window, it all looks fine again (until you switch to another tab..)

So can we fix this by creating a Dynamic Action that mimics that "browser window resize" event?
Yes we can!

Create a Dynamic Action that fires on Click of the jQuery selector li.apex-rds-item a. That should fire a JavaScript snippet : 
apex.event.trigger(this.triggeringElement, "apexwindowresized");

So now a click on a tab not only switches from one IR to another but also fires that event that will "autofix" the IR headers. A simple solution for an annoying problem.

This applies to APEX 5.0, I assume it will be solved in 5.1.
Post a Comment