ant-design / ant-design/pro-components
关于自定义optionRender的需求。
- Dominant language
- TypeScript
- Stars
- 4.8k
- Forks
- 1.4k
- Avg merge
- 10h 44m
- Merged PRs (30d)
- 3
Description
### 🥰 需求描述 | Requirements description
有一个问题,protable生成form的同时,在form里有自带的两个按钮,重置和查询,这两个按钮所占用的各自,也受 span: 4,控制,在我设置span:4时,如果我再重置和查询按钮这个盒子再多放3-4个按钮,空间就不够了,会有一个溢出,我想请问的是这个盒子能不能像 colums{
title: '仓库',
dataIndex: 'warehouseName',
width: 200,
colSize: 2,
},有类似于colSize的属性,colSize:2直接写在colums中,可以让此项form搜索项,占用两个col的宽度,那么有类似的API可以让search={{optionRender}}中的optionRender多占用两个格子,或者其他解决方式吗?
如下图,我多放几个,就溢出了,

Contributor guide
Research direction
Start from ProTable's search optionRender behavior and compare it with the columns colSize example described in the issue. Determine how the optionRender button container currently uses the configured span and define a way for it to occupy additional columns without overflow. Done means several additional buttons fit within the search form layout.
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
- Mostly clear
- Newbie friendliness
- 35/100