Ardalan
Ardalan

Reputation: 848

change default texts in react-data-table-component

Is it possible to change the default texts in react data table component? For example when there are no data available, it says "There are no records to display" but i need to change the text based on the language the user have selected. Is it possible to change default texts and font?

Upvotes: 2

Views: 7240

Answers (1)

nexun
nexun

Reputation: 311

Use noDataComponent attribute in your DataTable component

<DataTable
    columns={columns}
    noDataComponent="Your Text Here" //or your component
    data={data}          
    pagination
/>

Upvotes: 15

Related Questions