[#46117785] Allow maxPages options

1. It will allow to maxPages in pagination.
2. If set to 10, the last page in navigator should is 10.