-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
feat(module: core) Allow controls to be used in default EditForm #2138
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2138 +/- ##
==========================================
+ Coverage 27.86% 29.89% +2.02%
==========================================
Files 492 515 +23
Lines 32544 24777 -7767
Branches 0 242 +242
==========================================
- Hits 9070 7407 -1663
+ Misses 23474 17334 -6140
- Partials 0 36 +36
Continue to review full report at Codecov.
|
Why don't you use |
I have alot of custom validation (using async FluentValidators) that's had
alot of work done to get working. I figured I would be able to replace the
default controls, but all of my validations stopped working because the
EditContext wasn't getting set into the base component.
It's an upgrade path that I'm sure others have struggled with.
…On Sun, Nov 28, 2021, 7:08 PM Hao Sun ***@***.***> wrote:
Why don't you use AntDesign.Form instead of EditForm? there's an EditForm
inside AntDesign.Form, so default blazor components should be able to
work with ant-design components together in a AntDesign.Form.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#2138 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABTVH4IUKVS6VBZLUISST63UOLHA7ANCNFSM5I5YHLQA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
You can setup your custom validations using https://antblazor.com/en-US/components/form#components-form-demo-customized-form-validator |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Hi @knight1219 , |
I'm on vacation till Monday but I will take a look when I get back. Is there an issue this showed up in? |
Hello @knight1219 , would you fixed this? |
🤔 This is a ...
🔗 Related issue link
Issue was detailed on Discord
💡 Background and solution
When trying to convert my app to use AntDesign, none of the validation styling worked. Doing some research I found that none of the controls could be used as a drop in replacement for default Blazor Controls. No validation was getting fired as the EditContext was fully able to cascade down. This in addition to the validation styling being part of the FormItem was a problem for me.
I have updated the FormItem to be able to be used in the default EditForm and updated the AntInputComponentBase to be able to cascade the EditContext. Added a demo of this in the
Form
area of the documents.📝 Changelog
☑️ Self Check before Merge