ant-design / ant-design/pro-components

🐛[BUG] ProDescriptions 组件使用属性 emptyText={<div></div>} 报错:React does not recognize the `emptyText` prop on a DOM element.

Open
#8,090 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

> ### 🐛 bug 描述
ProDescriptions 组件使用属性 emptyText={

} 报错:React does not recognize the emptyText prop on a DOM element
> ### 📷 复现步骤
ProDescriptions 设置 emptyText 属性
> ### 🏞 期望结果
ProDescriptions 设置 emptyText 属性控制台不报错
> ### 💻 复现代码
}
request={getData}
/>
> ### © 版本信息
> * ProComponents 版本: [2.6.43]
> * umi 版本
> * 浏览器环境
> * 开发环境 [e.g. windows]
>
> ### 🚑 其他信息
![image](https://github.com/ant-design/pro-components/assets/63828394/4a286930-39f2-4919-ba9e-e30d6f498203)

Contributor guide

Open the contributing guide

Research direction

Start at the ProDescriptions component entry point and trace how the emptyText property is handled when rendering the component. Reproduce the issue with the provided example, then verify that using emptyText={"

"} no longer produces the React DOM prop warning.

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
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.