Refactor  pageSize calculation, remove `isLoaded`.