The Zurich release has arrived! Interested in new features and functionalities? Click here for more

Make the filter in simple list widget non-visible

Sam Ogden
Tera Guru

Hi All,

I'm just in the process of configuring our Service Portal.   I've added in a couple of simple list Widgets, but when I click on view all it displays the filter that has been applied.   I want the filter to apply but I don't want the users to be able to view it (screenshot below of current view).   I've cloned the widget and had removed the following lines of code from the HTML section:

      <!-- <i class="fa fa-filter" ng-click="c.toggleFilter()" ng-class="{'disabled-filter': !c.showFilter}"></i> -->

      <div ng-show="c.showFilter">

          <input ng-model="c.data.filterText" ng-model-options="{debounce: 300}" sn-focus="c.showFilter" placeholder="{{::data.filterMsg}}" ng-change="c.update()" class="form-control input-sm filter-box">

      </div>

  </div>

However the filter still displayed, any help on how to remove this is greatly appreciated.

find_real_file.png

1 ACCEPTED SOLUTION

Hi Sam,



I managed to hide the filter using this method:



  1. Opened Service Portal > Pages
  2. Opened the List page with id=list
  3. Clicked the link to the instance
    find_real_file.png
  4. Added this in the Widget Instance field "Additional options, JSON format" and saved:

{


  "show_breadcrumbs": {


          "value": false,


          "displayValue": "Breadcrumbs"  


      }


}


This worked once I reloaded the page.



BR


/Miriam


View solution in original post

5 REPLIES 5

Miriam Berg
Kilo Guru

Just a thought on your filter:



It will take some time for the users to run that filter each time they open that page. A simpler filter would run quicker and take up less space in the browser.



Anyway, the page that opens once you hit "View all" (id=list) doesn't use the Simple List widget. It uses Data Table from URL Definition, which in turn uses the Data Table widget.


So you would want to clone and change one of those widgets instead, or use an option... I believe there is an option to hide/show the filter? As indicated by <div ng-if="options.show_breadcrumbs && data.filter" class="filter-breadcrumbs">



Best Regards,


Miriam


Hi Miriam,



Thanks for the above.   Do you know where the option to hide/show the filter is held?



Thanks


Hi Sam,



I managed to hide the filter using this method:



  1. Opened Service Portal > Pages
  2. Opened the List page with id=list
  3. Clicked the link to the instance
    find_real_file.png
  4. Added this in the Widget Instance field "Additional options, JSON format" and saved:

{


  "show_breadcrumbs": {


          "value": false,


          "displayValue": "Breadcrumbs"  


      }


}


This worked once I reloaded the page.



BR


/Miriam


That's great and worked a treat.   Thanks for all your help.