Material-table: how to give custom style to EmptyDataSourceMessage

Viewed 801
1 Answers

I was able to add HTML the the EmptyDataSource message using this in the render function:

const emailContact = <a href="mailto:myEmailAddressHere">Email Info</a>;
const noResultsMessage = <span>No results were found. Please email {emailContact</span>;

and then in the return method adding:

localization={{
    body: {
        emptyDataSourceMessage: noResultsMessage
    }
}}
Related