ant-design / ant-design/pro-components

🧐[问题]在使用ProTable时,查询表单使用renderFormItem自定义表单项,在表单展开或者收起时,自定义表单项都会更新,如何避免?

Open
#9,289 1 comment 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

提问前先看看:

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

### 🧐 问题描述

### 💻 示例代码

`
{
title: UseIntl({ id: 'common.type.device' }),
dataIndex: 'deviceName',
key: 'deviceType',
renderFormItem: () => (

),
render: (_, record) => convertDeviceType(record.deviceName),
}
`

### 🚑 其他信息

Image

Contributor guide

Open the contributing guide

Research direction

Start at ProTable's renderFormItem entry point and reproduce the behavior with the provided DeviceType example. Trace what happens when the query form expands or collapses, then verify that the custom form item no longer updates unnecessarily when toggling the form.

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
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.