Skip to content

🐛[BUG] Protable 设置 defaultColsNumber 时搜索控件被异常隐藏 #8563

Open
@Lemonnnnnnnnnnn

Description

提问前先看看:

https://github.com/ryanhanwu/How-To-Ask-Questions-The-Smart-Way/blob/main/README-zh_CN.md

🐛 bug 描述

当设置 defaultColsNumber 等于控件数量时,columns 数组的最后一个元素无法被展示出来

📷 复现步骤

Screenshot from 2024-07-13 11-43-41

🏞 期望结果

Screenshot from 2024-07-13 11-44-08

💻 复现代码

import { ProTable } from "@ant-design/pro-components";

function App() {
  return (
    <ProTable
      columns={[
        {
          title: "name",
          dataIndex: "name",
        },
        {
          title: "age",
          dataIndex: "age",
        },
        {
          title: "address",
          dataIndex: "address",
        },
        {
          title: "sex",
          dataIndex: "sex",
        },
        {
          title: "weight",
          dataIndex: "weight",
        },
      ]}
      search={{ defaultColsNumber: 6 }}
    />
  );
}

export default App;

© 版本信息

  • ProComponents 版本: 2.7.10
  • 浏览器环境: chrome
  • 开发环境 : windows

🚑 其他信息

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions