Reset table filter if moved to another apps page

Dear Apps Builders,

In our app, the user can apply a filter directly in the table. If the user then navigates to another app page and returns to the previous one, this filter is still active. However, the user might change some other variables while browsing on the other app pages that affect the table. In that case, the previously chosen filter does not make sense any more but is still applied.
Is there are way to reset the table filter (or make it temporary only) once the app page is changed?

Yes, there is a property on the page-configuration called clearFiltersOnLeave.

Example configuration:

{
  "id": "<pageId>",
  "clearFiltersOnLeave": {
    "method": "<elements|syncSets|allElements|commonElements|noncommonElements>", // "allElements" will reset all filters on page change, "commonElements" only the ones of elements also on the page navigated to and "noncommonElements" of elements not on the page navigated to
    "elements": ["<elementId>"], // used with method "elements" to clear filters of the specified elements
    "syncSets": ["<syncSetId>"] // used with method "syncSets" to clear filters of elements publishing to this sync set
  }
}

It seems this property is not documented in our ODML-Documentation. I’ll see to it being added.

1 Like