首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >如何在React JS中修改物料UI prop-function的默认值?

如何在React JS中修改物料UI prop-function的默认值?
EN

Stack Overflow用户
提问于 2018-05-28 18:10:51
回答 1查看 4.6K关注 0票数 10

我正在使用React JS,我已经从Material UI导入了一个名为(https://material-ui.com/api/table-pagination/)的组件,我想修改labelDisplayedRows的默认设置,如下所示:

({ from, to, count }) => ${from}-${to} of ${count}

我想编辑输出的" of“,但它是一个函数,所以我不知道怎么做。如果它是一个像labelRowsPerPage这样的简单节点,我会这样修改它:

<TablePagination
                    labelRowsPerPage="text text text"
/>

我怎么能做到呢?提前谢谢你

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2018-05-28 19:35:06

如下所示:

<TablePagination labelDisplayedRows={({ from, to, count }) => `Displaying pages ${from}-${to} of total ${count} pages`}/>
票数 13
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/50563982

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档