How does tt.plugins.SearchBox.filterSearchResults work?

Greetings.
I need to find locations only within one municipality. How to do it via filterSearchResults option?

Example:

function filterFunction(result) {
  if (result.address.municipality === "Lodz") {
    return true;
  }
  return false;
}

Remember that this will only filter the results on the list from the plugin.

1 Like