Feature request type
Enhance forms
Component name
No response
What should be done?
This is very nice UI framework but it lacks good developer experience for forms.
For example, currently form components like Textbox or Select are responsible for displaying labels, their position and error messages. This design introduces these limitations:
- Each form component needs to have same repetitve properties as
Label, LabelPlacement, ErrorMessage, Description, etc
- It's harder to create new custom form components. This is very important as any framework should allow to create custom form components with same styling.
- Since components accept
ErrorMessage property, form validation with DataAnnotationsValidator becomes as not a trivial task.
- Probably harder to ensure consistent field styling for all components
Instead I suggest to have some kind of reusable FormField wrapper component that would be responsible for displaying labels, description as other frameworks do. Regarding validation errors, it could have a placeholder to use either Blazor's ValidationMessage component or any custom message.
If it had better form DX and more form controls (DatePicker, TextArea), it would be my number 1 choice for new Blazor projects!
Pull Request
Feature request type
Enhance forms
Component name
No response
What should be done?
This is very nice UI framework but it lacks good developer experience for forms.
For example, currently form components like
TextboxorSelectare responsible for displaying labels, their position and error messages. This design introduces these limitations:Label,LabelPlacement,ErrorMessage,Description, etcErrorMessageproperty, form validation withDataAnnotationsValidatorbecomes as not a trivial task.Instead I suggest to have some kind of reusable
FormFieldwrapper component that would be responsible for displaying labels, description as other frameworks do. Regarding validation errors, it could have a placeholder to use either Blazor'sValidationMessagecomponent or any custom message.If it had better form DX and more form controls (DatePicker, TextArea), it would be my number 1 choice for new Blazor projects!
Pull Request