You don’t need an extension for this. You just need to edit your model search method, and change the query criteria, which triggers the filter query, and generates your grid dataProvider.
Yii’s GridView relies on the source data from a dataProvider and the related query you build for that - to do filtering.
If you feel you have to extend, instead of GridView… IMO… you should try to extend the DataProvider or build/extend a Model class/method which generates this DataProvider.