See answer from the other pagination PR.