ant-design / ant-design/pro-components

🐛[BUG]Protable中form设置grid:true会报错items.flatMap is not a function

Open
#8,253 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
4.8k
Forks
1.4k
Avg merge
10h 44m
Merged PRs (30d)
3

Description

### 🐛 bug 描述

想要自定义Protable搜索表单中搜索框位置,于是使用form的栅栏布局方式,设置 grid:true 后报错items.flatMap is not a function
### 📷 复现步骤

1. 在ProTable form中使用添加grid:true,如下
`
form={{
grid:true,
}}
/>
`
2. 打开前端就会报错items.flatMap is not a function

### © 版本信息

- ProComponents 版本: 2.6.52
- ProTable 版本:3.15.1

Contributor guide

Open the contributing guide

Research direction

Start at the ProTable form implementation and reproduce the reported configuration with form={{ grid: true }} using ProComponents 2.6.52 and ProTable 3.15.1. Trace the value passed to the code that calls items.flatMap, then verify that enabling grid no longer throws an error and that the search form still renders.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.