This is a description on how to remove the "Show All" Button of the Region Display Selector. It also shows a method to display a default entry on PageLoad.
To clarify what is tried to achieve here, consider following two pictures.
standard region display selector behaviour
after this tutorial (no Show All and Default selection)
For the removal of the Show All Tab of the Region Display Selector and the selection of an specific Tab, 3 lines of JavaScript Code are neccessary that will be executed on PageLoad as Dynamic Action. The tab that will be preselected is specified within an hidden Item, e.g. P51_RDS_DEFAULT.
Now we get already to the last step - the dynamic action that we require. The trigger for this will be PageLoad and Javascript has to be the True-Action that need to be executed.
Here are the before mentioned three lines of Code. First line removes the Show All tab. The second line sets the now first tab as first tab. This is required as the first tab has a different CSS-class because of the different borders of the tab. And the third line opens the default tab that is stored in P51_RDS_DEFAULT. The value has to be a number 0..n, where n is the number of available tabs minus 1.
$('.apex-rds li:first-child').remove(); $('.apex-rds li:first-child').addClass('apex-rds-first'); $('.apex-rds li:eq(' + apex.item('P51_RDS_DEFAULT').getValue() + ') > a').trigger('click');