reactjsreact-data-table-component

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?


Solution

  • Use noDataComponent attribute in your DataTable component

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