Aller au contenu principal

LgEditForm

Module : Lagoon.UI
Namespace : Lagoon.UI.Components
Catégorie : Forms
Hérite de : LgComponentBase

Based on branch release/5.0 --> https://github.com/dotnet/aspnetcore/blob/release/5.0/src/Components/Web/src/Forms/EditForm.cs Renders a form element that cascades an EditContext to descendants. Lagoon modifications: - Add DataAnnotationValidator and LgValidatorSummary in the BuildRenderTree - DRAFT Add OnEditStateChanged event

Paramètres​

ParamètreTypeDescription
AdditionalAttributesIReadOnlyDictionary<string, object>Gets or sets a collection of additional attributes that will be applied to the created form element.
ChildContentRenderFragment<EditContext>Specifies the content to be rendered inside this EditForm.
ConfirmationMessagestringGets or sets the confirmation message to show before submit.
CssClassstringGets or sets the CSS classes.
EditContextEditContextSupplies the edit context explicitly. If using this parameter, do not also supply Model, since the model value will be taken from the EditContext.Model property.
ErrorsDisplayOptionsEditFormErrorsDisplayOptions?Get or set optionnal error display option (if not set, application configuration will be used)
IgnoreFormTrackingboolIgnore form from tracking modifications.
ModelobjectSpecifies the top-level model object for the form. An edit context will be constructed for this model. If using this parameter, do not also supply a value for EditContext.
OnInvalidSubmitEventCallback<EditContext>A callback that will be invoked when the form is submitted and the EditContext is determined to be invalid.
OnSubmitEventCallback<EditContext>A callback that will be invoked when the form is submitted. If using this parameter, you are responsible for triggering any validation manually, e.g., by calling EditContext.Validate.
OnValidSubmitEventCallback<EditContext>A callback that will be invoked when the form is submitted and the EditContext is determined to be valid.
RequiredInputDisplayModeRequiredInputDisplayMode?Get or set the display mode of mandory and optional fields
SubmitOnEnterboolGet or set the falg indicating if the form should be submitted when enter key is pressed. (true by default)
UseValidationComplexModelbool?Active a ObjectGraphDataAnnotationsValidator instead of a simple DataAnnotationsValidator (required when you have nested properties with DataAnnotation)
ValidationErrorMessagestringIf set replace the default error message (#lgEditFormValidation)

Paramètres en cascade​

ParamètreTypeDescription
FormTrackerLgFormTrackerPotential form tracker defined by an ancestor