Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Custom "Previous" & "Next" text in react-table

Is there a way to customize the text in the footer part of react-table?

This part of the react-table

I'm trying to customize the default text there. Thanks in advance.

like image 709
cankentcode Avatar asked Jan 29 '18 07:01

cankentcode


2 Answers

As per the doc here react-table, it is possible to add custom Footers to the table using the Footer property of the columns prop of the component.

However , if you want to change the Previous and Next text as seen in the screenshot i'd say you have to change the nextText and prevText props of the main ReactTable components, more can be seen here in the props documentation

like image 74
semuzaboi Avatar answered Sep 20 '22 22:09

semuzaboi


So after checking the docs, what I did is just define the custom text as props of the ReactTable.

<ReacTable 
   previousText={myCustomPreviousText}
   nextText={myCustomNextText}
   {...}
/>
like image 38
cankentcode Avatar answered Sep 21 '22 22:09

cankentcode