ant-design / ant-design/pro-components

🧐[问题]請問SchemaForm跟ProForm設了Group,如何一行只顯示一個Field?

Open
#7,528 0 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

### 🧐 问题描述
設定Group後,我不管怎麼調整底下Field的寬度,一行就是顯示兩個Field,有辦法調成一行只顯示一個Field嗎?
或是有其他類似Group的組件能做到能折疊的功能又一行只顯示一個Field?

### 💻 示例代码
```
{
title: '分组1',
valueType: 'group',
fieldProps: {
collapsible: true,
style: {
backgroundColor: '#f0f7ff'
},
titleStyle: {
backgroundColor: '#7ebaff'
}
},
columns: [
{
title: '标签',
dataIndex: 'labels',
width: 'xl',
},
{
title: '创建时间',
key: 'showTime',
dataIndex: 'createName',
valueType: 'date',
width: 'xl',
}
],
},
```

### 🚑 其他信息

![圖片](https://github.com/ant-design/pro-components/assets/12706683/7cc874d2-9909-4f56-8c37-dddf1e8840b2)

Contributor guide

Open the contributing guide

Research direction

Start by reading the SchemaForm and ProForm entry points for the valueType: 'group' configuration, focusing on how the supplied columns are laid out and how collapsible fieldProps are handled. Reproduce the provided example and determine whether the existing configuration supports one field per row; done means documenting or implementing a clear way to keep the group collapsible while displaying one field per row.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.