Skip to content

Commit

Permalink
feat: added new fields
Browse files Browse the repository at this point in the history
default-value and display-name-key
  • Loading branch information
mfranzke committed Jun 25, 2023
1 parent 5491106 commit b77028b
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions packages/components/_templates/power-apps/new/comp-xml.ejs.t
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,32 @@ force: true
control-type="standard">

<% if(locals.props){ locals.props.forEach((prop)=>{ -%>
<property name="<%= prop.name %>" display-name-key="<%= prop.name %>_Display_Key"
<property name="<%= prop.name %>"
<% if(typeof prop.displayNameKey !== 'undefined' && prop.displayNameKey){ -%>
display-name-key="<%= prop.displayNameKey %>"
<% } else { -%>
display-name-key="<%= prop.name %>_Display_Key"
<% } -%>
description-key="<%= prop.name %>_Desc_Key"
<% if(typeof prop.onChange !== 'undefined' && prop.onChange){ -%>
usage="bound"
<% } else{ -%>
<% } else { -%>
usage="input"
<% } -%>
<% if(typeof prop.required !== 'undefined' && prop.required){ -%>
required="true"
<% } else{ -%>
<% } else { -%>
required="false"
<% } -%>
<% if(typeof prop.defaultValue !== 'undefined' && prop.defaultValue){ -%>
default-value="<%= prop.defaultValue %>"
<% } -%>
<% if(typeof prop.type !== 'undefined' && prop.type !== "Icon" && prop.type !== "DefaultVariant"){ -%>
of-type="<%= prop.type %>"
<% } else if(prop.type === "Icon"){ -%>
Expand Down

0 comments on commit b77028b

Please sign in to comment.