Hide Pagination

Hi,

I want to show the entire results in a single page based on my search. How to hide the pagination?

Could you give us more information? Did you build your own UI with pagination? Are you using the Reference UI?

Yes i am using reference UI only. I want to hide the pagination in my site. Is it possible to hide?
Based on my search, i need to show all the results in a single page.

I believe the max page size is only 100, so showing all results would be tricky.

However, you could show 100 results and hide pagination.

To hide pagination, just look in the source code at the App.js file and remove the line bodyFooter={<Paging />}.

To fix the page size to 100, add the initialState.resultsPerPage parameter to the config variable and set its value to 100. Example: https://github.com/elastic/search-ui/blob/master/ADVANCED.md#example-using-custom-options.

You could then hide the option to change the page size by removing the {wasSearched && <ResultsPerPage />} from App.js.

If you need to show over 100 results you'll need to implement something called "infinite scrolling", which would be tricky.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.