Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pagination: configurable "results" label #293

Closed
markramsden-dwp opened this issue Jan 6, 2022 · 2 comments · Fixed by #294
Closed

Pagination: configurable "results" label #293

markramsden-dwp opened this issue Jan 6, 2022 · 2 comments · Fixed by #294
Labels
enhancement New feature or request good first issue Good for newcomers released

Comments

@markramsden-dwp
Copy link

It would be useful to be able to specify the text used to display the count of results so that instead of always saying (for example) "Showing 1 to 50 of 90 results" it could instead say "Showing 1 to 50 of 90 documents".

<p class="moj-pagination__results">Showing <b>{{ params.results.from }}</b> to <b>{{ params.results.to }}</b> of <b>{{params.results.count}}</b> results</p>

@gregtyler
Copy link
Contributor

This sounds like a good idea and would be quite straightforward to add.

It's worth noting though that the pagination component is being added to the GOV.UK Design System and they're researching the best way to allow customisation. For example, our component has hard-coded English in it so isn't possible to use with other languages.

@gregtyler gregtyler added enhancement New feature or request good first issue Good for newcomers labels Jan 6, 2022
gregtyler added a commit that referenced this issue Jan 6, 2022
Allow users to use custom text in the pagination summary, defaulting to "results" if unspecified.

fixes #293
gregtyler added a commit that referenced this issue Jan 7, 2022
Allow users to use custom text in the pagination summary, defaulting to "results" if unspecified.

fixes #293
gregtyler added a commit that referenced this issue Jan 10, 2022
Allow users to use custom text in the pagination summary, defaulting to "results" if unspecified.

fixes #293
gregtyler pushed a commit that referenced this issue Jan 10, 2022
# [1.2.0](v1.1.0...v1.2.0) (2022-01-10)

### Features

* **pagination:** allow customisation of pagination results text ([5771ca7](5771ca7)), closes [#293](#293)
@gregtyler
Copy link
Contributor

🎉 This issue has been resolved in version 1.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants