是否可以隐藏蚂蚁设计中空表的标题?
这是我的桌子 没有数据
我的表在列上具有默认的过滤。
const columns = [
...other_columns,
{
title: 'Requester',
dataIndex: 'requester',
key: 'requester',
width: '10%',
defaultFilteredValue: 'User1',
...getColumnSearchProps('requester', searchInput, handleSearch, handleReset, filterObj),
},
]
当表为空时,我想向用户展示另一个布局而不是表。我尝试使用表提供的locale
支架,但我想隐藏标头并创建类似的东西。 ANTD会为此提供道具吗?还是可以实现这一目标? 没有数据时没有表
This is my table
Table with no data
My table has a default filtering on a column.
const columns = [
...other_columns,
{
title: 'Requester',
dataIndex: 'requester',
key: 'requester',
width: '10%',
defaultFilteredValue: 'User1',
...getColumnSearchProps('requester', searchInput, handleSearch, handleReset, filterObj),
},
]
When the table is empty i want to show the user another layout instead of the table. I tried using locale
prop that the table provides but i want to hide the header and create something like this. Does antd provide a prop for that? Or is there any hack available to achieve this? No table when no data
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在桌子上使用Sheadheader道具
Use the showHeader prop on Table
如果您不想在没有数据时显示表组件,则取决于您。如果我正确,如果没有数据,您想隐藏整个桌子。在这种情况下,您可以创建一个父组件,以管理要显示的组件。这样的东西
It is up to you if you don't want to show the table component when there is no data. If I got you right you want to hide the whole table if there is no data. In that case, you can create a parent component that will manage which component to show. Something like this