Hiding a List View Filter

Post your TD Mobile tools and samples or ask for them.
FRBhote
India
Posts: 127
Joined: 09 Mar 2017, 05:32
Location: Hyderabad, India

Hiding a List View Filter

Post by FRBhote » 10 Jul 2018, 11:33

A list view filter is always visible, even when a list view is not. For example:
f1.png
JS to hide the list view filter:
var list = document.getElementsByClassName("ui-filterable")[0];
list.style.visibility = 'hidden';
To show:
var list = document.getElementsByClassName("ui-filterable")[0];
list.style.visibility = 'visible';
You do not have the required permissions to view the files attached to this post.

Igor Ivanovic
Site Admin
Site Admin
Croatia
Posts: 155
Joined: 05 Mar 2017, 12:37
Location: Zagreb, Croatia

Hiding a List View Filter

Post by Igor Ivanovic » 11 Jul 2018, 13:25

Very nice tip!

Thanks!
Igor Ivanovic
Image

FRBhote
India
Posts: 127
Joined: 09 Mar 2017, 05:32
Location: Hyderabad, India

Hiding a List View Filter

Post by FRBhote » 17 Jul 2018, 05:27

And to clear the filter:
var anc = document.getElementsByClassName("ui-input-clear ui-btn ui-icon-delete ui-btn-icon-notext ui-corner-all")[0];
anc.click();

tom_bond
Germany
Posts: 11
Joined: 09 Mar 2017, 09:20
Location: Germany

Hiding a List View Filter

Post by tom_bond » 18 Jul 2018, 14:49

And set filter text:
var myFilter = document.getElementsByClassName("ui-filterable");
myFilter[0].elements[0].placeholder="Filter Items - new text";
Thomas Janocha
FORMAT Software GmbH

SQLBase 9.0.1, 11.6, 11.7.4, 12.0.2, TeamDeveloper 6.1, 7.0.3, TD Mobile 2.1

Return to “Tools & Samples”

Who is online

Users browsing this forum: [Ccbot] and 0 guests