ant-design / pro-components

🏆 Use Ant Design like a Pro!
https://pro-components.antdigital.dev
MIT License
4.3k stars 1.36k forks source link

🐛[BUG] ProFormMoney 在React 18.3.1 下报 Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate #8429

Open bxvs888 opened 5 months ago

bxvs888 commented 5 months ago

提问前先看看:

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

🐛 bug 描述

含有 ProFormMoney 页面在React 18.3.1 下打开直接报错 Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.

📷 复现步骤

任何一个form,只要含有 ProFormMoney 就报错。

🏞 期望结果

正常展示金额输入框 。

💻 复现代码

© 版本信息

🚑 其他信息

image

AdamKarwan commented 4 months ago

I am also having this problem. It seems to happen when using antd 5.17.3 or newer. It does not error if I use antd 5.17.2

MaybeQHL commented 3 months ago

the same question .

laketea commented 1 month ago

the same question. antd: 5.19.3 , pro-components:2.7.1. ProFormMoney in ProFormList will case this problem