You can trigger both, like you can call your filter function to your pagination flow or vice vesa.
Not sure if that answers your question if not you can provide more information with screenshots,
You are doing server pagination right, please see the link below that should assist you with that.