简体   繁体   English

如何使用material-ui从DevExtreme React Grid获取数据表的完全控件样式?

[英]How to get full control styling for data table from DevExtreme React Grid with material-ui?

I have trouble with styling DevExtreme React Grid, follow by there found from there documentation here . 我在设计DevExtreme React Grid方面遇到了麻烦,请点击此处的文档。

Here's the sample code I have from copy some other repo. 这是我复制一些其他回购的示例代码 My questions: 我的问题:

  1. How can I get full control on the styling, because I see <Table> component, but is there a way I can adding class to <th>, <td> , I would like to add the class or someway to have full control styling for font size, or hover styling. 我怎样才能完全控制样式,因为我看到<Table>组件,但有一种方法可以将类添加到<th>, <td> ,我想添加类或者某种方式来完全控制样式用于字体大小或悬停样式。

  2. I had a really hard time my table header, like to change to bold and another background color, it's by material UI 我的桌面标题非常困难,比如改为粗体和另一种背景颜色,它是通过素材UI

  3. After I add the Fixed Columns method on scrolling my table, the style is not matching with my other table row, it's changed to all white background, no grey and white on each row 在我滚动表格后添加固定列方法后,样式与我的其他表格行不匹配,它变为全白色背景,每行没有灰色和白色

  4. When I hit the rest, I would like to row change to be another color. 当我打完剩下的时候,我想把换成另一种颜色。

Thank you so much for your help! 非常感谢你的帮助!

I checked with their GitHub issues: 我检查了他们的GitHub问题:

Not fully support adding class to the component, but you can create a theme for it. 不完全支持向组件添加类,但您可以为其创建主题。

About fixColumn styling found the demo from this sandbox . 关于fixColumn样式从这个沙箱中找到了演示。 Hope this sample help 希望这个示例帮助

Pagination issue with sorting can be fixed by this: 排序的分页问题可以通过以下方法解决:

//after state area:
changePageSize = pageSize => this.setState({ pageSize });
// Plugin
<PagingState
   defaultCurrentPage={0}
   pageSizes={pageSizes}
   defaultPageSize={15}
   onPageSizeChange={this.changePageSize}
/>
<IntegratedPaging />
//UI 
<PagingPanel pageSizes={pageSizes} />

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM