I am using iron-data-table to display and select a user from a list of users. I have a need to clear all the filter values at once, and I don't know if there is a feature I may be missing in the API.
I have successfully changed the filter values in the object, then cleared the cache, resetting the list to a non-filtered list, like so:
this.$.list.filter[0].filter = "";
this.$.list.filter[1].filter = "";
this.$.list.clearCache();
However, even though the list is unfiltered, the text remains in the filter input fields.
Is there a built-in way to clear the text? If not, is there any simple way to reference the values of those generated filter input fields?
One of the sub-elements of
iron-data-table
,data-table-column-filter
, has a convenientvalue
property. Basically, I did a query selector to get eachdata-table-column-filter
element.Once I had the list of elements, I iterated over them and set each
value
to""
.