def search(self, context: SearchContext) -> None: self.begin_reset() try: gui_hooks.browser_will_search(context) if context.ids is None: context.ids = self._state.find_items(context.search, context.order) gui_hooks.browser_did_search(context) self._items = context.ids self._rows = {} finally: self.end_reset()
def search(self, context: SearchContext) -> None: self.begin_reset() try: if context.order is True: try: context.order = self.columns[self._state.sort_column] except KeyError: # invalid sort column in config context.order = self.columns["noteCrt"] context.reverse = self._state.sort_backwards gui_hooks.browser_will_search(context) if context.ids is None: context.ids = self._state.find_items(context.search, context.order, context.reverse) gui_hooks.browser_did_search(context) self._items = context.ids self._rows = {} finally: self.end_reset()