Table 中不配置sorter和sortOrder 为什么无缘无故添加了一个<div title="排序">? #12613
Closed
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version
3.10.0
Environment
和环境无关
Reproduction link
https://ant.design/components/table-cn/
Steps to reproduce
我以为是自己写的问题,结果在官方API上面看到table都是那样,https://ant.design/components/table-cn/
const tableConfig = {
columns: columns,
dataSource: this.state.dataSource,
rowKey: record => record.id,
bordered: true,
loading: this.state.loading,
title: () => {
return 管理员列表;
},
pagination: this.state.pagination,
onChange: this.handleTableChange,
locale: {
filterTitle: '筛选',
filterConfirm: '确定',
filterReset: '重置',
emptyText: '暂无数据',
},
size: 'middle',
sorter:false
};
渲染的样子:
<thead className="ant-table-thead"> <tr> <th className=""> <div title="排序">登录名</div> </th> <th className=""> <div title="排序">昵称</div> </th> <th className=""> <div title="排序">状态</div> </th> <th className=""> <div title="排序">操作</div> </th> </tr> </thead>
点击这样的表头还能触发table的onChange事件!!!
What is expected?
不会新增这样一个div
What is actually happening?
<thead className="ant-table-thead"> <tr> <th className=""> <div title="排序">登录名</div> </th> <th className=""> <div title="排序">昵称</div> </th> <th className=""> <div title="排序">状态</div> </th> <th className=""> <div title="排序">操作</div> </th> </tr> </thead>
The text was updated successfully, but these errors were encountered: