Rollbase 5 clear search - Forum - Rollbase - Progress Community

Rollbase 5 clear search

 Forum

Rollbase 5 clear search

This question is answered

Hi,

I have a search page for which I only need the Search Criteria, not the Standard search. For the view I selected "Hide advanced filter" and by default when I open the page I have the Search Criteria only and no possibility to change it.
The issue is that when I do a "Clear Filters" the search reverts to the Standard one.
Is there any way I can keep this from happening?


Best regards,

Dora

Verified Answer
  • Thanks for reporting this, Dora. We acknowledge this as a bug and will fix it in a future release.

    As a workaround on private cloud, you can patch rb-ui.js (master/prod modules) by removing the sole occurrence of the following line of code

    var k=$(d).find("div.rbs-filter-type-dropdown").data("kendoDropDownList");if(k){k.select(2);}

    Delete the above code from rb-ui.js. If you cannot find the entire line, search using just "rbs-filter-type-dropdown" and identify the code

All Replies
  • Thanks for reporting this, Dora. We acknowledge this as a bug and will fix it in a future release.

    As a workaround on private cloud, you can patch rb-ui.js (master/prod modules) by removing the sole occurrence of the following line of code

    var k=$(d).find("div.rbs-filter-type-dropdown").data("kendoDropDownList");if(k){k.select(2);}

    Delete the above code from rb-ui.js. If you cannot find the entire line, search using just "rbs-filter-type-dropdown" and identify the code

  • Hi,

    Thank you for your feedback. Using this I was able to make the clear filters work for us. I just added some extra code because we have pages that use both Search Criteria and Standard Filter. Also the function would only clear input & select elements, but Search Criteria formula element is a textarea.

    var k=$(d).find("div.rbs-filter-type-dropdown").data("kendoDropDownList");

    if(k.value() == 3){
        //clear standard filter
        rb.newui.util.clearInputElements($(d).find("select"));
        var i = $(d).find("input[type!='hidden']");
        i = i.filter(function() {
            var p = $(this).attr("type");
            return p !== "submit" && p != "reset";
        });
        rb.newui.util.clearInputElements(i);
    }
    else{
        //clear search criteria
        var i = $(d).find("textarea[name='formula']");
        rb.newui.util.clearInputElements(i);
    }