Refactor EditFormTemplate context initialization
Refactored the EditFormTemplate block to separate SetEditContext and editModel initialization for improved clarity. Removed the call to SetPopupHeaderText(editModel.IsNew) from this section to streamline context setup and avoid potential logic issues.
This commit is contained in:
@@ -117,7 +117,8 @@ else
|
|||||||
</Columns>
|
</Columns>
|
||||||
<EditFormTemplate Context="editFormContext">
|
<EditFormTemplate Context="editFormContext">
|
||||||
@{
|
@{
|
||||||
SetEditContext(editFormContext.EditContext); var editModel = (CatalogEditModel)editFormContext.EditModel; SetPopupHeaderText(editModel.IsNew);
|
SetEditContext(editFormContext.EditContext);
|
||||||
|
var editModel = (CatalogEditModel)editFormContext.EditModel;
|
||||||
}
|
}
|
||||||
<DxFormLayout ColCount="2">
|
<DxFormLayout ColCount="2">
|
||||||
<DxFormLayoutItem Caption="Titel">
|
<DxFormLayoutItem Caption="Titel">
|
||||||
|
|||||||
Reference in New Issue
Block a user