How can i always expand a filter Icon/(condition) in a Widget?

Vinodha3
Giga Contributor

Hi,

I have Cloned 'Data table from Instance Definition' widget and added filter icon by writing server script as below in widget,

options.enable_filter=true;
show_keywords = true; 

This works fine, but my client requirement is that this filter icon should always expanded as shown in screen shot below.

find_real_file.png

I tried just adding one more line script in server like

enable_filter.expand = true;

Not working. Can anyone suggest me what can i do this to expand always. Only in a particular widget not in all places.

Thanks!

Vinodha

1 ACCEPTED SOLUTION

Alikutty A
Tera Sage

Hello,

By default, the filter is hidden when page is loaded. This is possible if you take the clones of all widgets associated with the list widget.

I see there are 3 embedded widgets which are used to render the Filter breadcrumbs widget.

Take a copy of the Filter breadcrumb widget, and replace the following line in Client script from 

$scope.showFilter = false;

to

$scope.showFilter = true;

This will display filter always when page is opened. You need to replace this cloned widget in the copy of a Data table widget in the server side script around line 155 

data.filterBreadcrumbs = $sp.getWidget('custom_breadcrumb_widget_id', breadcrumbWidgetParams);

And then replace the Data table widget in your primary List widget for Data Table from URl or the list widget in its server script.

Thanks!

View solution in original post

2 REPLIES 2

Alikutty A
Tera Sage

Hello,

By default, the filter is hidden when page is loaded. This is possible if you take the clones of all widgets associated with the list widget.

I see there are 3 embedded widgets which are used to render the Filter breadcrumbs widget.

Take a copy of the Filter breadcrumb widget, and replace the following line in Client script from 

$scope.showFilter = false;

to

$scope.showFilter = true;

This will display filter always when page is opened. You need to replace this cloned widget in the copy of a Data table widget in the server side script around line 155 

data.filterBreadcrumbs = $sp.getWidget('custom_breadcrumb_widget_id', breadcrumbWidgetParams);

And then replace the Data table widget in your primary List widget for Data Table from URl or the list widget in its server script.

Thanks!

This is very helpful. Thanks very much.

 

Were you able to change the condition as well to show it as 'Active' is 'TRUE' by default? I have a requirement to display 'Last Name'  'starts with' ... ' as a default filter when they open the page.

Any help will be highly appreciated!