Skip to content

Commit

Permalink
Merge pull request #32 from Ali-YousefiTelori/develop
Browse files Browse the repository at this point in the history
Support for FormItemEvent edit
  • Loading branch information
Ali-YousefiTelori authored Jan 17, 2024
2 parents 6ed8a52 + cb87ff4 commit 75d683d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
<Authors>EasyMicroservices</Authors>
<IsPackable>true</IsPackable>
<Version>0.0.0.27</Version>
<Version>0.0.0.28</Version>
<Description>TemplateGenerator UI compoents.</Description>
<Copyright>[email protected]</Copyright>
<PackageTags>component,microcomponent,ui,core,templategenerator,generator,template,form,formgenerator</PackageTags>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
<Authors>EasyMicroservices</Authors>
<IsPackable>true</IsPackable>
<Version>0.0.0.27</Version>
<Version>0.0.0.28</Version>
<Description>TemplateGenerator view model.</Description>
<Copyright>[email protected]</Copyright>
<PackageTags>component,microcomponent,ui,core,templategenerator,generator,template,form,formgenerator</PackageTags>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,22 @@ public FormItemContract UpdateFormItemContract
Title = value.Title;
Type = value.Type;
DefaultValue = value.DefaultValue;
FormItems.Clear();
if (value.Items != null)
{
foreach (var item in value.Items)
{
FormItems.Add(item);
}
}
FormItemEvents.Clear();
if (value.Events != null)
{
foreach (var item in value.Events)
{
FormItemEvents.Add(item);
}
}
if (value.PrimaryFormItemId.HasValue)
SelectedNoParentFormItem = NoParentFormItems.FirstOrDefault(x => x.Id == value.PrimaryFormItemId);
}
Expand Down Expand Up @@ -252,6 +261,7 @@ public void Clear()
Title = "";
DefaultValue = "";
FormItems.Clear();
FormItemEvents.Clear();
UpdateFormItemContract = default;
}

Expand Down

0 comments on commit 75d683d

Please sign in to comment.