[英]MDBDataTable has heading both top and bottom and filters ui not working
I am using MDBDataTable and it has double heading both on top and bottom and i dont know how to get rid of it .我正在使用 MDBDataTable,它的顶部和底部都有双标题,我不知道如何摆脱它。
The code goes like.代码就像这样。
The function return the data required for the datatable , the function is函数返回数据表所需的数据,函数是
const setProducts = () => {
const data = {
columns: [
{
label: "id",
field: "id",
},
{
label: "Name",
field: "name",
width: 150,
attributes: {
"aria-controls": "DataTable",
"aria-label": "Name",
},
},
{
label: "price",
field: "price",
width: 270,
},
{
label: "Category",
field: "category",
width: 150,
},
{
label: "Description",
field: "desc",
sort: "disabled",
width: 100,
}
],
rows: [],
};
product.forEach((p) => {
data.rows.push({
id: p.id,
name: p.data.name,
price: p.data.price,
category: p.data.category,
desc: p.data.Description,
});
});
return data;
};
And the returned ui is返回的ui是
return(
<MDBDataTable
striped
bordered
searchLabel="Search Product"
hover
data={setProducts()}
/>
)
The output is输出是
How to get rid of two column headers both at the top and bottom如何摆脱顶部和底部的两个列标题
EDIT编辑
And i am not even getting arrows which is got during filtering the data when the mouse is hovered over the column header当鼠标悬停在列标题上时,我什至没有得到在过滤数据期间得到的箭头
What i have我有的
What i need我需要的
noBottomColumns={true} (隐藏最下面一行) theadTextWhite={true} (文字会变成白色,如果表格背景为白色,标题将不可见)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.