question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Table Pagination Label

See original GitHub issue

The md-data-table-pagination label (“Rows per page:”) has been hard-coded which is not the ngMaterial way, and specially a problem when creating apps in non-english languages.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:18 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
volmerfcommented, Jan 12, 2016

We also agree with @webpartisan that there is no 2-way binding currently. Switching the language of the website will not switch the language of the mdLabel. Only on refreshing the page the translation is triggered.

This is our code:

vm.updateTranslations();
$rootScope.$on('$translateChangeSuccess', updateTranslations);

function updateTranslations(event) {

            $translate(['GENERAL.PAGINATION.PAGE', 'GENERAL.PAGINATION.ROWS_PER_PAGE', 'GENERAL.PAGINATION.OF']).then(function (translations) {
                vm.paginationLabel.page = translations['GENERAL.PAGINATION.PAGE'];
                vm.paginationLabel.rowsPerPage = translations['GENERAL.PAGINATION.ROWS_PER_PAGE'];
                vm.paginationLabel.of = translations['GENERAL.PAGINATION.OF'];
            });
        }

Changing the language will trigger the updateTranslations function but will not update the label.

0reactions
raulsperonicommented, Sep 2, 2016

@shivasingh0101 could you solve this? i’m facing the same problem…

Read more comments on GitHub >

github_iconTop Results From Across the Web

TablePagination API - Material UI - MUI
API reference docs for the React TablePagination component. Learn about the props, CSS, and other APIs of this exported module.
Read more >
The Ultimate Guide to Material-UI Table Pagination (MUI v5)
Table pagination can be broken into two conceptual pieces: the UI interface for changing pages, and the paginated data request.
Read more >
Implement pagination for React Material table - Stack Overflow
This is needed for the table component to know what page to request and how many pages there are in total, without needing...
Read more >
Pagination | Components - BootstrapVue
Pagination. Quick first, previous, next, last, and page buttons for pagination control of another component (such as <b-table> ...
Read more >
Pagination - Bootstrap
For example, if the pagination component is used to navigate between a set of search results, an appropriate label could be aria-label="Search results ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found