New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FormItem required 为 undefined 时会使 必选样式 丢失 #41621
Labels
Comments
@Wxh16144 不是漏传,是 required 传了 undefined 后就会丢失必选样式 |
liixing
changed the title
FormItem 封装以后必选样式丢失
FormItem required 为 undefined 时会使 rules 里的 required 失效
Apr 4, 2023
@liixing 是指 required 的样式丢失了吗? |
liixing
changed the title
FormItem required 为 undefined 时会使 rules 里的 required 失效
FormItem required 为 undefined 时会使 必选样式 丢失
Apr 4, 2023
@Yuiai01 是的 |
This comment was marked as off-topic.
This comment was marked as off-topic.
嗯,见上。这相当于自己覆盖了一个 |
@zombieJ 这感觉不妥吧, isRequred 判断了 required 为 undefined 情况但是下面却被覆盖了,感觉这应该 merge 一下 |
我和你看法一致,我这边已经在做了,带会儿提交 PR 看看用例通过情况。 |
20 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Reproduction link
https://stackblitz.com/edit/react-ts-kxpvis?file=App.tsx
Steps to reproduce
FormItem required 为 undefined 时会使 必选样式 丢失
What is expected?
rules 里面有 required 后,required 传 undefined 时不会影响必选样式
What is actually happening?
FormItem required 为 undefined 时会使 rules 里的必选样式丢失
The text was updated successfully, but these errors were encountered: