Alright, I think this is a bug in Sitecore and I will suggest you to reach to support team for this, but I found a workaround for this. You need to update the ItemBucket.utils.js
file for this -
\sitecore\shell\Applications\Buckets\Scripts\ItemBucket.utils.js
In this file, you need to update few lines in establishViews
function, a hack is to trigger the click event based on the current view by adding a line- $j("#" + window.CurrentView).trigger("click");
-
if (window.CurrentView && window.CurrentView !== "list") {
$j("#views a").removeClass("active");
$j("#" + window.CurrentView).trigger("click");
$j("#" + window.CurrentView).addClass("active");
}
in additional, there one more line need to update for showing the active view after the click in the same function from $j("#" + filter.ID).addClass("active");
to $j("#" + filter.ViewName).addClass("active");
-
$j.each(views, function (index, filter) {
$j("#" + filter.ViewName).click(function () {
CurrentView = filter.ViewName;
a.find(".sb_up").click();
pageNumber = 0;
$j.each(defaultViews, function (subIndex, subfilter) {
$j("." + subfilter).removeClass("active");
});
$j("#" + filter.ViewName).addClass("active");
$j('.content').css({ 'opacity': 1.0 });
$j("#ajaxBusy").css({ display: "block" });
var n = buildQuery();
runQuery(n, pageNumber, h, OnSearchRunFail);
runFacet(n, pageNumber, meme, OnSearchRunFail);
$j(".navAlpha").html("");
$j(".slide-out-div").html("").prepend(LoadGifText);
$j("#ajaxBusyFacet").css({
display: "none",
margin: "0px auto",
width: "44px"
});
});
});