Fixed paging calculation issue

- Added goToPage behavior while clicking over a page number.
- Fixed issue while calculating page number array.