diff --git a/tailbone/grids/core.py b/tailbone/grids/core.py index 4a748536..639eabd1 100644 --- a/tailbone/grids/core.py +++ b/tailbone/grids/core.py @@ -353,7 +353,13 @@ class Grid(object): self.joiners[key] = joiner def set_sorter(self, key, *args, **kwargs): - self.sorters[key] = self.make_sorter(*args, **kwargs) + if len(args) == 1 and args[0] is None: + self.remove_sorter(key) + else: + self.sorters[key] = self.make_sorter(*args, **kwargs) + + def remove_sorter(self, key): + self.sorters.pop(key, None) def set_sort_defaults(self, sortkey, sortdir='asc'): self.default_sortkey = sortkey