![](/img/trans.png)
[英]How can I change the color of material-table icons of onRowAdd, onRowUpdate, onRowDelete?
[英]How can I show sorting icons all the time and with blue color for current sorting column in react material-table
我已經使用材料表庫創建了一個材料表。 我想一直顯示所有列的排序圖標。 對於當前排序的列,顏色也應該是藍色。
下面是代碼的沙盒鏈接。
https://codesandbox.io/s/stupefied-mclean-okcvx?file=/src/App.js
我怎樣才能達到上述預期的輸出?
有沒有辦法通過覆蓋組件來實現這一點?
要始終顯示排序圖標(不僅在懸停時),您需要為材料表應用 CSS 樣式。
樣式文件
.App {
font-family: sans-serif;
}
.MuiTableSortLabel-icon {
opacity: 1;
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.