I'm working with React JS and I've imported from Material UI a ponent called (/) and I would like to modify the Default of labelDisplayedRows that now is like this:
({ from, to, count }) => ${from}-${to} of ${count}
I would like to edit the "of" of the output, but it's a function, and so i don't know how to do it. If it was a simple node like labelRowsPerPage I would modify it by writing
<TablePagination
labelRowsPerPage="text text text"
/>
How could I do it? Thank you in advance
I'm working with React JS and I've imported from Material UI a ponent called (https://material-ui./api/table-pagination/) and I would like to modify the Default of labelDisplayedRows that now is like this:
({ from, to, count }) => ${from}-${to} of ${count}
I would like to edit the "of" of the output, but it's a function, and so i don't know how to do it. If it was a simple node like labelRowsPerPage I would modify it by writing
<TablePagination
labelRowsPerPage="text text text"
/>
How could I do it? Thank you in advance
Share Improve this question asked May 28, 2018 at 10:10 M_LudeM_Lude 3651 gold badge4 silver badges14 bronze badges 2- Give it a function which returns the string you need? Where exactly is your issue? – ChrisR Commented May 28, 2018 at 10:47
-
the solution is kind like this: <TablePagination labelDisplayedRows={({ from, to, count }) =>
Displaying pages ${from}-${to} of total ${count} pages
}/> – M_Lude Commented May 28, 2018 at 12:19
1 Answer
Reset to default 15Something like this:
<TablePagination labelDisplayedRows={({ from, to, count }) => `Displaying pages ${from}-${to} of total ${count} pages`}/>