按照以下示例: https://material-table.com/#/docs/features/localization
我想给EmptyDataSourceMessage自定义样式(基本上是我的兴趣所在)。
任何想法我该怎么做?
答案 0 :(得分:0)
我能够使用render函数中的HTML添加EmptyDataSource消息:
const emailContact = <a href="mailto:myEmailAddressHere">Email Info</a>;
const noResultsMessage = <span>No results were found. Please email {emailContact</span>;
,然后在return方法中添加:
localization={{
body: {
emptyDataSourceMessage: noResultsMessage
}
}}