Calls a piece of code with the DOM element that corresponds to
        a search field of the table.

        If the callback causes a ``StaleElementReferenceException``,
        this method will refetch the search fields and try
        again. Consequently **the callback should be designed to be
        callable multiple times and should only interact with the
        search field passed to it.** It should not fetch or interact
        with other DOM elements.

        :param name: The name of the field to use.
        :param callback: The callback to call. The first parameter
        will be the Selenium ``WebElement`` that is the search field.

def call_with_search_field(self, name, callback):
        """
        Calls a piece of code with the DOM element that corresponds to
        a search field of the table.

        If the callback causes a ``StaleElementReferenceException``,
        this method will refetch the search fields and try
        again. Consequently **the callback should be designed to be
        callable multiple times and should only interact with the
        search field passed to it.** It should not fetch or interact
        with other DOM elements.

        :param name: The name of the field to use.
        :param callback: The callback to call. The first parameter
        will be the Selenium ``WebElement`` that is the search field.
        """
        done = False
        while not done:
            def check(*_):
                if name in self._search_fields:
                    return True

                # Force a refetch
                self._found_fields = None
                return False

            self.util.wait(check)
            field = self._search_fields[name]
            try:
                callback(field)
                done = True
            except StaleElementReferenceException:
                # We force a refetch of the fields
                self._found_fields = None