Reactjs 如何向TablePagination ActionComponent添加自定义道具?

Reactjs 如何向TablePagination ActionComponent添加自定义道具?,reactjs,material-ui,Reactjs,Material Ui,我尝试扩展数据表组件(材质表)以使其可翻译。它使用自己的组件作为ActionComponentprop,其中有一些字符串我喜欢翻译。 我扩展了MTablePagination组件以使用名为本地化的道具中的翻译字符串,但我无法使用它。MTablePagination组件使用material ui和Styles方法导出为hoc。 如果我尝试使用扩展组件,将导致以下错误消息: Warning: React.createElement: type is invalid -- expected a str

我尝试扩展数据表组件(材质表)以使其可翻译。它使用自己的组件作为
ActionComponent
prop,其中有一些字符串我喜欢翻译。
我扩展了MTablePagination组件以使用名为
本地化
的道具中的翻译字符串,但我无法使用它。MTablePagination组件使用material ui
和Styles
方法导出为hoc。
如果我尝试使用扩展组件,将导致以下错误消息:

Warning: React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got:
<WithStyles(MTablePaginationInner) />. Did you accidentally export a JSX literal instead of a component?
警告:React.createElement:类型无效--需要字符串(对于内置组件)或类/函数(对于复合组件),但得到:
. 您是否意外地导出了JSX文本而不是组件?
原始TablePagination组件的使用方式如下:

import MTablePagination from./m-table-pagination';
我尝试使用如下扩展组件:

import MTablePagination from./m-table-pagination';
const本地化={someKey:'some value'};
常数分页=
我对material ui非常陌生,我想我误解了一些东西,但我在文档中找不到任何指向我的正确方法…

给动作组件提供自己的道具的正确方法是什么?

我必须再次回答我的一个问题。。。材质表已通过图标道具进行了增强,该图标道具同样需要向
ActionComponent
道具添加自定义道具

他们使用组件作为函数来解决它,如:

ActionsComponent={(subsps)=>}
我将尝试调整此解决方案

--编辑:添加最终代码---

import MTablePagination from./m-table-pagination';
const本地化={someKey:'some value'};
常数分页=
}
/>