Set default status in CP admin for queried entries from "All" to "Live" Just wondering if there's a way to set the default status for the entry listing pages in the admin, in my case from "All" to "Live". This would need to account for a page "refresh" and navigation using the sidebar links.

I've tried to amend the toolbar property available in the passed context for the cp.layouts.base hook but this is purely visual and has no effect on the criteria to query for these entries.

I've attached a screenshot to confirm location for anyone who's unsure. Many thanks in advance!
After a little head-scratching, the only way I could get this working was to register an AssetBundle (to load in my own JS), and making use of the Garnish toolkit as follows:

$(document).ready(function() {
    var statusSet = false;

    Craft.elementIndex.on('updateElements selectSource', function(data) {
        if (!statusSet) {
            // Find the option (and make sure it actually exists)
            $option = data.target.statusMenu.$options.filter('a[data-status="live"]:first');

            if ($option.length) {
                data.target.setStatus($option.data('status'))
                statusSet = true;
            }
        }
    });
});


This should only trigger the setStatus() process once, even when navigating between sources (which will also be filtered to to the saved status state of "Live"), but allows the user the freedom to change the status again if they so choose.

I hope this helps :)