level12 / webgrid

Other
12 stars 7 forks source link

'apply_search' is called for empty 'search_value' values #144

Closed tjlevel12 closed 3 years ago

tjlevel12 commented 3 years ago

Currently, the grid's self.search_value gets set to an empty string "" if no explicit search string is set by the user: https://github.com/level12/webgrid/blob/a4dd7c3ad4bfc234e865e9aa81d84f808d9cd96a/webgrid/__init__.py#L1604-L1609

Since "" is not None, self.apply_search gets called even when no search string is specified: https://github.com/level12/webgrid/blob/a4dd7c3ad4bfc234e865e9aa81d84f808d9cd96a/webgrid/__init__.py#L1472-L1473

guruofgentoo commented 3 years ago

I've also noted that the search param is not removed during reset.